using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marathon.Infrastructure.Migrations
{
///
public partial class AddPaperBets : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "PaperBets",
columns: table => new
{
Id = table.Column(type: "TEXT", nullable: false),
AnomalyId = table.Column(type: "TEXT", nullable: false),
EventCode = table.Column(type: "TEXT", nullable: false),
PickedSide = table.Column(type: "INTEGER", nullable: false),
Rate = table.Column(type: "TEXT", nullable: false),
Stake = table.Column(type: "TEXT", nullable: false),
OpenedAt = table.Column(type: "TEXT", nullable: false),
Outcome = table.Column(type: "INTEGER", nullable: false),
SettledAt = table.Column(type: "TEXT", nullable: true),
Payout = table.Column(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaperBets", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_PaperBets_AnomalyId",
table: "PaperBets",
column: "AnomalyId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_PaperBets_Outcome",
table: "PaperBets",
column: "Outcome");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "PaperBets");
}
}
}