using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace SVSim.Database.Migrations
{
///
public partial class Initial : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateSequence(
name: "ShortUdidSequence",
startValue: 400000000L);
migrationBuilder.CreateTable(
name: "ArenaSeasons",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Mode = table.Column(type: "integer", nullable: false),
Enable = table.Column(type: "integer", nullable: false),
Cost = table.Column(type: "numeric(20,0)", nullable: false),
RupyCost = table.Column(type: "numeric(20,0)", nullable: false),
TicketCost = table.Column(type: "integer", nullable: false),
IsJoin = table.Column(type: "boolean", nullable: false),
FormatInfo = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ArenaSeasons", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AvatarAbilities",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
LeaderSkinId = table.Column(type: "integer", nullable: false),
BattleStartFirstPlayerTurnBp = table.Column(type: "integer", nullable: false),
BattleStartSecondPlayerTurnBp = table.Column(type: "integer", nullable: false),
BattleStartMaxLife = table.Column(type: "integer", nullable: false),
AbilityCost = table.Column(type: "text", nullable: false),
Ability = table.Column(type: "text", nullable: false),
PassiveAbility = table.Column(type: "text", nullable: false),
AbilityDesc = table.Column(type: "text", nullable: false),
PassiveAbilityDesc = table.Column(type: "text", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AvatarAbilities", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Banners",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
ImageName = table.Column(type: "text", nullable: false),
Click = table.Column(type: "text", nullable: false),
Status = table.Column(type: "text", nullable: false),
ChangeTime = table.Column(type: "integer", nullable: false),
RemainingTime = table.Column(type: "integer", nullable: false),
ImagePaths = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Banners", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Battlefields",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Name = table.Column(type: "text", nullable: false),
IsOpen = table.Column(type: "boolean", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Battlefields", x => x.Id);
});
migrationBuilder.CreateTable(
name: "BattlePassLevels",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Level = table.Column(type: "integer", nullable: false),
RewardData = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_BattlePassLevels", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CardSets",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Name = table.Column(type: "text", nullable: false),
IsInRotation = table.Column(type: "boolean", nullable: false),
IsBasic = table.Column(type: "boolean", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CardSets", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Classes",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Name = table.Column(type: "text", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Classes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ClassExpCurve",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
NecessaryExp = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ClassExpCurve", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Colosseums",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
ColosseumId = table.Column(type: "text", nullable: false),
ColosseumName = table.Column(type: "text", nullable: false),
CardPoolName = table.Column(type: "text", nullable: false),
DeckFormat = table.Column(type: "text", nullable: false),
StartTime = table.Column(type: "timestamp with time zone", nullable: false),
EndTime = table.Column(type: "timestamp with time zone", nullable: false),
NowRound = table.Column(type: "text", nullable: false),
IsDisplayTips = table.Column(type: "text", nullable: false),
TipsId = table.Column(type: "text", nullable: false),
IsColosseumPeriod = table.Column(type: "boolean", nullable: false),
IsRoundPeriod = table.Column(type: "boolean", nullable: false),
IsNormalTwoPick = table.Column(type: "text", nullable: false),
IsSpecialMode = table.Column(type: "text", nullable: false),
IsAllCardEnabled = table.Column(type: "integer", nullable: false),
SalesPeriodInfo = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Colosseums", x => x.Id);
});
migrationBuilder.CreateTable(
name: "DailyLoginBonuses",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
BonusId = table.Column(type: "integer", nullable: false),
BonusData = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DailyLoginBonuses", x => x.Id);
});
migrationBuilder.CreateTable(
name: "DefaultDecks",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
DeckNo = table.Column(type: "integer", nullable: false),
ClassId = table.Column(type: "integer", nullable: false),
SleeveId = table.Column(type: "bigint", nullable: false),
LeaderSkinId = table.Column(type: "integer", nullable: false),
DeckName = table.Column(type: "text", nullable: false),
CardIdArray = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DefaultDecks", x => x.Id);
});
migrationBuilder.CreateTable(
name: "DefaultLeaderSkinSettings",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
ClassId = table.Column(type: "integer", nullable: false),
IsRandomLeaderSkin = table.Column(type: "integer", nullable: false),
LeaderSkinId = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DefaultLeaderSkinSettings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Degrees",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Degrees", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Emblems",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Emblems", x => x.Id);
});
migrationBuilder.CreateTable(
name: "FeatureMaintenances",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
FeatureKey = table.Column(type: "text", nullable: false),
Data = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_FeatureMaintenances", x => x.Id);
});
migrationBuilder.CreateTable(
name: "GameConfigs",
columns: table => new
{
SectionName = table.Column(type: "text", nullable: false),
ValueJson = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_GameConfigs", x => x.SectionName);
});
migrationBuilder.CreateTable(
name: "Items",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Name = table.Column(type: "text", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Items", x => x.Id);
});
migrationBuilder.CreateTable(
name: "LoadingExclusionCards",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false),
CardId = table.Column(type: "bigint", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_LoadingExclusionCards", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MaintenanceCards",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false),
CardId = table.Column(type: "bigint", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_MaintenanceCards", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MasterPointRankingPeriods",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
PeriodNum = table.Column(type: "integer", nullable: false),
NecessaryScore = table.Column(type: "bigint", nullable: false),
BeginTime = table.Column(type: "timestamp with time zone", nullable: false),
EndTime = table.Column(type: "timestamp with time zone", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_MasterPointRankingPeriods", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MyPageBackgrounds",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_MyPageBackgrounds", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MyRotationAbilities",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
AbilityId = table.Column(type: "integer", nullable: false),
Data = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_MyRotationAbilities", x => x.Id);
});
migrationBuilder.CreateTable(
name: "MyRotationSettings",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
RotationId = table.Column(type: "integer", nullable: false),
CardSetIdsCsv = table.Column(type: "text", nullable: false),
AbilitiesCsv = table.Column(type: "text", nullable: false),
ReprintedCardIds = table.Column(type: "jsonb", nullable: false),
RestrictedCardIds = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_MyRotationSettings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Packs",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
BasePackId = table.Column(type: "integer", nullable: false),
GachaType = table.Column(type: "integer", nullable: false),
PackCategory = table.Column(type: "integer", nullable: false),
PosterType = table.Column(type: "integer", nullable: false),
CommenceDate = table.Column(type: "timestamp with time zone", nullable: false),
CompleteDate = table.Column(type: "timestamp with time zone", nullable: false),
SalesPeriodTime = table.Column(type: "timestamp with time zone", nullable: true),
SleeveId = table.Column(type: "integer", nullable: false),
SpecialSleeveId = table.Column(type: "integer", nullable: false),
OverrideDrawEffectPackId = table.Column(type: "integer", nullable: false),
OverrideUiEffectPackId = table.Column(type: "integer", nullable: false),
GachaDetail = table.Column(type: "text", nullable: false),
IsHide = table.Column(type: "boolean", nullable: false),
IsNew = table.Column(type: "boolean", nullable: false),
IsPreRelease = table.Column(type: "boolean", nullable: false),
OpenCountLimit = table.Column(type: "integer", nullable: false),
GachaPointConfig_ExchangeablePoint = table.Column(type: "integer", nullable: true),
GachaPointConfig_IncreaseGachaPoint = table.Column(type: "integer", nullable: true),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Packs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PaymentItems",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
ProductId = table.Column(type: "integer", nullable: false),
StoreProductId = table.Column(type: "bigint", nullable: false),
Name = table.Column(type: "text", nullable: false),
Text = table.Column(type: "text", nullable: false),
Price = table.Column(type: "numeric", nullable: false),
ChargeCrystalNum = table.Column(type: "integer", nullable: false),
FreeCrystalNum = table.Column(type: "integer", nullable: false),
PurchaseLimit = table.Column(type: "integer", nullable: false),
SpecialShopFlag = table.Column(type: "integer", nullable: false),
ImageName = table.Column(type: "text", nullable: false),
StartTime = table.Column(type: "timestamp with time zone", nullable: false),
EndTime = table.Column(type: "timestamp with time zone", nullable: false),
RemainingTime = table.Column(type: "integer", nullable: false),
IsResaleProduct = table.Column(type: "integer", nullable: false),
ResaleStartDate = table.Column(type: "timestamp with time zone", nullable: true),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PaymentItems", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PracticeOpponents",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
PracticeId = table.Column(type: "integer", nullable: false),
TextId = table.Column(type: "text", nullable: false),
ClassId = table.Column(type: "integer", nullable: false),
CharaId = table.Column(type: "integer", nullable: false),
DegreeId = table.Column(type: "integer", nullable: false),
AiDeckLevel = table.Column(type: "integer", nullable: false),
AiLogicLevel = table.Column(type: "integer", nullable: false),
AiMaxLife = table.Column(type: "integer", nullable: false),
Battle3dFieldId = table.Column(type: "text", nullable: false),
IsMaintenance = table.Column(type: "boolean", nullable: false),
IsCampaignPractice = table.Column(type: "boolean", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PracticeOpponents", x => x.Id);
});
migrationBuilder.CreateTable(
name: "PreReleaseInfos",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
PreReleaseId = table.Column(type: "text", nullable: false),
NextCardSetId = table.Column(type: "text", nullable: false),
StartTime = table.Column(type: "timestamp with time zone", nullable: false),
EndTime = table.Column(type: "timestamp with time zone", nullable: false),
DisplayEndTime = table.Column(type: "timestamp with time zone", nullable: false),
FreeMatchStartTime = table.Column(type: "timestamp with time zone", nullable: false),
CardMasterId = table.Column(type: "integer", nullable: false),
DefaultCardMasterId = table.Column(type: "text", nullable: false),
PreReleaseCardMasterId = table.Column(type: "text", nullable: false),
IsPreRotationFreeMatchTerm = table.Column(type: "boolean", nullable: false),
RotationCardSetIdList = table.Column(type: "jsonb", nullable: false),
ReprintedBaseCardIds = table.Column(type: "jsonb", nullable: false),
LatestReprintedBaseCardIds = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_PreReleaseInfos", x => x.Id);
});
migrationBuilder.CreateTable(
name: "RankInfo",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Name = table.Column(type: "text", nullable: false),
NecessaryPoint = table.Column(type: "integer", nullable: false),
AccumulatePoint = table.Column(type: "integer", nullable: false),
LowerLimitPoint = table.Column(type: "integer", nullable: false),
BaseAddBp = table.Column(type: "integer", nullable: false),
BaseDropBp = table.Column(type: "integer", nullable: false),
StreakBonusPt = table.Column(type: "integer", nullable: false),
WinBonus = table.Column(type: "double precision", nullable: false),
LoseBonus = table.Column(type: "double precision", nullable: false),
MaxWinBonus = table.Column(type: "integer", nullable: false),
MaxLoseBonus = table.Column(type: "integer", nullable: false),
IsPromotionWar = table.Column(type: "integer", nullable: false),
MatchCount = table.Column(type: "integer", nullable: false),
NecessaryWin = table.Column(type: "integer", nullable: false),
ResetLose = table.Column(type: "integer", nullable: false),
AccumulateMasterPoint = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_RankInfo", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ReprintedCards",
columns: table => new
{
Id = table.Column(type: "bigint", nullable: false),
CardId = table.Column(type: "bigint", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ReprintedCards", x => x.Id);
});
migrationBuilder.CreateTable(
name: "SealedSeasons",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
Enable = table.Column(type: "integer", nullable: false),
CrystalCost = table.Column(type: "integer", nullable: false),
RupyCost = table.Column(type: "integer", nullable: false),
TicketCost = table.Column(type: "integer", nullable: false),
DeckUsingNumMin = table.Column(type: "integer", nullable: false),
ScheduleId = table.Column(type: "integer", nullable: false),
IsJoin = table.Column(type: "boolean", nullable: false),
IsDeckCodeMaintenance = table.Column(type: "boolean", nullable: false),
PackInfo = table.Column(type: "jsonb", nullable: false),
SalesPeriodInfo = table.Column(type: "jsonb", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_SealedSeasons", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Sleeves",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
DateCreated = table.Column(type: "timestamp with time zone", nullable: false),
DateUpdated = table.Column(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Sleeves", x => x.Id);
});
migrationBuilder.CreateTable(
name: "SpecialDeckFormats",
columns: table => new
{
Id = table.Column(type: "integer", nullable: false),
DeckFormat = table.Column(type: "text", nullable: false),
EndTime = table.Column(type: "timestamp with time zone", nullable: false),
DateCreated = table.Column