using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace RadicadeServer.Migrations { public partial class InventionsV2 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "CreatorPlayerId", table: "Inventions", type: "bigint", nullable: false, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AddColumn( name: "AICost", table: "Inventions", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "ChipsCost", table: "Inventions", type: "int", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "CloudVariablesCost", table: "Inventions", type: "int", nullable: false, defaultValue: 0); migrationBuilder.CreateTable( name: "InventionPersonalDetails", columns: table => new { DetailId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), PlayerId = table.Column(type: "bigint", nullable: false), InventionId = table.Column(type: "bigint", nullable: false), IsCheering = table.Column(type: "bit", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InventionPersonalDetails", x => x.DetailId); }); migrationBuilder.CreateTable( name: "InventionVersions", columns: table => new { VersionId = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), InventionId = table.Column(type: "bigint", nullable: false), ReplicationId = table.Column(type: "nvarchar(max)", nullable: false), VersionNumber = table.Column(type: "int", nullable: false), InstantiationCost = table.Column(type: "int", nullable: false), CloudVariablesCost = table.Column(type: "int", nullable: false), ChipsCost = table.Column(type: "int", nullable: false), LightsCost = table.Column(type: "int", nullable: false), BlobName = table.Column(type: "nvarchar(max)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_InventionVersions", x => x.VersionId); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "InventionPersonalDetails"); migrationBuilder.DropTable( name: "InventionVersions"); migrationBuilder.DropColumn( name: "AICost", table: "Inventions"); migrationBuilder.DropColumn( name: "ChipsCost", table: "Inventions"); migrationBuilder.DropColumn( name: "CloudVariablesCost", table: "Inventions"); migrationBuilder.AlterColumn( name: "CreatorPlayerId", table: "Inventions", type: "int", nullable: false, oldClrType: typeof(long), oldType: "bigint"); } } }