Testing more garbage encryption
This commit is contained in:
118
SVSim.Database/Migrations/20240907191709_Initial.cs
Normal file
118
SVSim.Database/Migrations/20240907191709_Initial.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SVSim.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Initial : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ShadowverseDeckEntry",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
InternalName = table.Column<string>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ShadowverseDeckEntry", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Viewer",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<ulong>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
DisplayName = table.Column<string>(type: "TEXT", nullable: false),
|
||||
ShortUdid = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Viewer", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CardEntry",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(type: "INTEGER", nullable: false),
|
||||
InternalName = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Attack = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Defense = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
PrimaryResourceCost = table.Column<int>(type: "INTEGER", nullable: true),
|
||||
Discriminator = table.Column<string>(type: "TEXT", maxLength: 21, nullable: false),
|
||||
ShadowverseDeckEntryId = table.Column<long>(type: "INTEGER", nullable: true),
|
||||
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CardEntry", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CardEntry_ShadowverseDeckEntry_ShadowverseDeckEntryId",
|
||||
column: x => x.ShadowverseDeckEntryId,
|
||||
principalTable: "ShadowverseDeckEntry",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SocialAccountConnection",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
AccountType = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
AccountId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
ViewerId = table.Column<ulong>(type: "INTEGER", nullable: false),
|
||||
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: true),
|
||||
DateUpdated = table.Column<DateTime>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SocialAccountConnection", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SocialAccountConnection_Viewer_ViewerId",
|
||||
column: x => x.ViewerId,
|
||||
principalTable: "Viewer",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CardEntry_ShadowverseDeckEntryId",
|
||||
table: "CardEntry",
|
||||
column: "ShadowverseDeckEntryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SocialAccountConnection_ViewerId",
|
||||
table: "SocialAccountConnection",
|
||||
column: "ViewerId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CardEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SocialAccountConnection");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "ShadowverseDeckEntry");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Viewer");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user