using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace SVSim.Database.Migrations
{
///
public partial class AddArenaColosseumRun : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ViewerArenaColosseumRuns",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ViewerId = table.Column(type: "bigint", nullable: false),
EntryId = table.Column(type: "bigint", nullable: false),
SeasonId = table.Column(type: "integer", nullable: false),
RoundId = table.Column(type: "integer", nullable: false),
DeckFormat = table.Column(type: "integer", nullable: false),
LeaderSkinId = table.Column(type: "bigint", nullable: false),
ConsumeItemType = table.Column(type: "integer", nullable: false),
CandidateClassIdsJson = table.Column(type: "jsonb", nullable: false),
SelectTurn = table.Column(type: "integer", nullable: false),
IsSelectCompleted = table.Column(type: "boolean", nullable: false),
SelectedCardIdsJson = table.Column(type: "jsonb", nullable: false),
PendingPickSetsJson = table.Column(type: "jsonb", nullable: false),
NextCandidateId = table.Column(type: "bigint", nullable: false),
ClassId = table.Column(type: "integer", nullable: false),
ChaosId = table.Column(type: "integer", nullable: false),
ResultListJson = table.Column(type: "jsonb", nullable: false),
WinCount = table.Column(type: "integer", nullable: false),
LossCount = table.Column(type: "integer", nullable: false),
BattleCountThisRound = table.Column(type: "integer", nullable: false),
MaxBattleCountThisRound = table.Column(type: "integer", nullable: false),
BreakthroughNumberThisRound = table.Column(type: "integer", nullable: false),
RestEntryNum = table.Column(type: "integer", nullable: false),
IsRankMatching = table.Column(type: "boolean", nullable: false),
IsChampion = table.Column(type: "boolean", nullable: false),
RegisteredDeckNoListJson = table.Column(type: "jsonb", nullable: false),
IsPublished = table.Column(type: "boolean", nullable: false),
CreatedAt = table.Column(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ViewerArenaColosseumRuns", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_ViewerArenaColosseumRuns_ViewerId",
table: "ViewerArenaColosseumRuns",
column: "ViewerId",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ViewerArenaColosseumRuns");
}
}
}