mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-27 16:09:07 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,108 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace RadicadeServer.Migrations
|
||||
{
|
||||
|
||||
public partial class InventionsV2 : Migration
|
||||
{
|
||||
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "CreatorPlayerId",
|
||||
table: "Inventions",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "AICost",
|
||||
table: "Inventions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ChipsCost",
|
||||
table: "Inventions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "CloudVariablesCost",
|
||||
table: "Inventions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InventionPersonalDetails",
|
||||
columns: table => new
|
||||
{
|
||||
DetailId = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
PlayerId = table.Column<long>(type: "bigint", nullable: false),
|
||||
InventionId = table.Column<long>(type: "bigint", nullable: false),
|
||||
IsCheering = table.Column<bool>(type: "bit", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_InventionPersonalDetails", x => x.DetailId);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InventionVersions",
|
||||
columns: table => new
|
||||
{
|
||||
VersionId = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
InventionId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ReplicationId = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
VersionNumber = table.Column<int>(type: "int", nullable: false),
|
||||
InstantiationCost = table.Column<int>(type: "int", nullable: false),
|
||||
CloudVariablesCost = table.Column<int>(type: "int", nullable: false),
|
||||
ChipsCost = table.Column<int>(type: "int", nullable: false),
|
||||
LightsCost = table.Column<int>(type: "int", nullable: false),
|
||||
BlobName = table.Column<string>(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<int>(
|
||||
name: "CreatorPlayerId",
|
||||
table: "Inventions",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user