133 lines
3.9 KiB
C#
133 lines
3.9 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace FinlyticTrades.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddMultiUserTradeExecution : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "ActualEntryPrice",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "EntryFee",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "ExecutionTimestamp",
|
|
table: "trades",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "ExitFee",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsGlobalProposal",
|
|
table: "trades",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsRecurring",
|
|
table: "trades",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "KnockoutThreshold",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "LeverageUsed",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "PositionSize",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "Quantity",
|
|
table: "trades",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "UserId",
|
|
table: "trades",
|
|
type: "character varying(100)",
|
|
maxLength: 100,
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "ActualEntryPrice",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "EntryFee",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ExecutionTimestamp",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "ExitFee",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsGlobalProposal",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsRecurring",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "KnockoutThreshold",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LeverageUsed",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionSize",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Quantity",
|
|
table: "trades");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "UserId",
|
|
table: "trades");
|
|
}
|
|
}
|
|
}
|