38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace FinlyticTrades.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddIndexToTradeHourlyUpdate : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "FloatingPnlPercent",
|
|
table: "trade_hourly_updates",
|
|
type: "numeric(18,4)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_trade_hourly_updates_TradeId_Timestamp",
|
|
table: "trade_hourly_updates",
|
|
columns: new[] { "TradeId", "Timestamp" });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_trade_hourly_updates_TradeId_Timestamp",
|
|
table: "trade_hourly_updates");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "FloatingPnlPercent",
|
|
table: "trade_hourly_updates");
|
|
}
|
|
}
|
|
}
|