using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace TaikoLocalServer.Migrations { /// public partial class AddDanDbTest : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "DanScoreData", columns: table => new { Baid = table.Column(type: "INTEGER", nullable: false), DanId = table.Column(type: "INTEGER", nullable: false), ArrivalSongCount = table.Column(type: "INTEGER", nullable: false), SoulGaugeTotal = table.Column(type: "INTEGER", nullable: false), ComboCountTotal = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_DanScoreData", x => new { x.Baid, x.DanId }); table.UniqueConstraint("AK_DanScoreData_Baid", x => x.Baid); table.ForeignKey( name: "FK_DanScoreData_Card_Baid", column: x => x.Baid, principalTable: "Card", principalColumn: "Baid", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "DanStageScoreData", columns: table => new { Baid = table.Column(type: "INTEGER", nullable: false), DanId = table.Column(type: "INTEGER", nullable: false), SongNumber = table.Column(type: "INTEGER", nullable: false), PlayScore = table.Column(type: "INTEGER", nullable: false), GoodCount = table.Column(type: "INTEGER", nullable: false), OkCount = table.Column(type: "INTEGER", nullable: false), BadCount = table.Column(type: "INTEGER", nullable: false), DrumrollCount = table.Column(type: "INTEGER", nullable: false), TotalHitCount = table.Column(type: "INTEGER", nullable: false), ComboCount = table.Column(type: "INTEGER", nullable: false), HighScore = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_DanStageScoreData", x => new { x.Baid, x.DanId, x.SongNumber }); table.ForeignKey( name: "FK_DanStageScoreData_DanScoreData_Baid", column: x => x.Baid, principalTable: "DanScoreData", principalColumn: "Baid", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_DanStageScoreData_DanScoreData_Baid_DanId", columns: x => new { x.Baid, x.DanId }, principalTable: "DanScoreData", principalColumns: new[] { "Baid", "DanId" }, onDelete: ReferentialAction.Cascade); }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "DanStageScoreData"); migrationBuilder.DropTable( name: "DanScoreData"); } } }