using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SCHALE.Common.Migrations { /// public partial class MemoryLobby_and_Scenario : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "MemoryLobbies", columns: table => new { ServerId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AccountServerId = table.Column(type: "bigint", nullable: false), MemoryLobbyUniqueId = table.Column(type: "bigint", nullable: false) }, constraints: table => { table.PrimaryKey("PK_MemoryLobbies", x => x.ServerId); table.ForeignKey( name: "FK_MemoryLobbies_Accounts_AccountServerId", column: x => x.AccountServerId, principalTable: "Accounts", principalColumn: "ServerId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateTable( name: "Scenarios", columns: table => new { ServerId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), AccountServerId = table.Column(type: "bigint", nullable: false), ScenarioUniqueId = table.Column(type: "bigint", nullable: false), ClearDateTime = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Scenarios", x => x.ServerId); table.ForeignKey( name: "FK_Scenarios_Accounts_AccountServerId", column: x => x.AccountServerId, principalTable: "Accounts", principalColumn: "ServerId", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_MemoryLobbies_AccountServerId", table: "MemoryLobbies", column: "AccountServerId"); migrationBuilder.CreateIndex( name: "IX_Scenarios_AccountServerId", table: "Scenarios", column: "AccountServerId"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "MemoryLobbies"); migrationBuilder.DropTable( name: "Scenarios"); } } }