40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace FinlyticEngine.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddUserIdToEngineTrades : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "UserId",
|
|
table: "engine_trades",
|
|
type: "uuid",
|
|
nullable: false,
|
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_engine_trades_UserId_Status",
|
|
table: "engine_trades",
|
|
columns: new[] { "UserId", "Status" });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_engine_trades_UserId_Status",
|
|
table: "engine_trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "UserId",
|
|
table: "engine_trades");
|
|
}
|
|
}
|
|
}
|