using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SVSim.Database.Migrations { /// public partial class ProdContentTables : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "CardSetIdForResourceDlView", table: "GameConfigurations", type: "integer", nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "ChallengeTwoPickSleeveId", table: "GameConfigurations", type: "bigint", nullable: false, defaultValue: 0L); migrationBuilder.AddColumn( name: "ChallengeUseTwoPickPremiumCard", table: "GameConfigurations", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "IsBattlePassPeriod", table: "GameConfigurations", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "IsBeginnerMission", table: "GameConfigurations", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "TsRotationId", table: "GameConfigurations", type: "text", nullable: false, defaultValue: ""); 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: "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: "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: "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: "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: "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: "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: "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: "SpotCards", columns: table => new { Id = table.Column(type: "bigint", nullable: false), CardId = table.Column(type: "bigint", nullable: false), Cost = 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_SpotCards", x => x.Id); }); migrationBuilder.CreateTable( name: "UnlimitedRestrictions", columns: table => new { Id = table.Column(type: "bigint", nullable: false), CardId = table.Column(type: "bigint", nullable: false), RestrictionValue = 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_UnlimitedRestrictions", x => x.Id); }); migrationBuilder.UpdateData( table: "GameConfigurations", keyColumn: "Id", keyValue: "default", columns: new[] { "CardSetIdForResourceDlView", "ChallengeTwoPickSleeveId", "ChallengeUseTwoPickPremiumCard", "IsBattlePassPeriod", "IsBeginnerMission", "TsRotationId" }, values: new object[] { 0, 0L, false, false, false, "" }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ArenaSeasons"); migrationBuilder.DropTable( name: "AvatarAbilities"); migrationBuilder.DropTable( name: "Banners"); migrationBuilder.DropTable( name: "BattlePassLevels"); migrationBuilder.DropTable( name: "Colosseums"); migrationBuilder.DropTable( name: "DailyLoginBonuses"); migrationBuilder.DropTable( name: "DefaultDecks"); migrationBuilder.DropTable( name: "DefaultLeaderSkinSettings"); migrationBuilder.DropTable( name: "FeatureMaintenances"); migrationBuilder.DropTable( name: "LoadingExclusionCards"); migrationBuilder.DropTable( name: "MaintenanceCards"); migrationBuilder.DropTable( name: "MasterPointRankingPeriods"); migrationBuilder.DropTable( name: "MyRotationAbilities"); migrationBuilder.DropTable( name: "MyRotationSettings"); migrationBuilder.DropTable( name: "PreReleaseInfos"); migrationBuilder.DropTable( name: "ReprintedCards"); migrationBuilder.DropTable( name: "SealedSeasons"); migrationBuilder.DropTable( name: "SpotCards"); migrationBuilder.DropTable( name: "UnlimitedRestrictions"); migrationBuilder.DropColumn( name: "CardSetIdForResourceDlView", table: "GameConfigurations"); migrationBuilder.DropColumn( name: "ChallengeTwoPickSleeveId", table: "GameConfigurations"); migrationBuilder.DropColumn( name: "ChallengeUseTwoPickPremiumCard", table: "GameConfigurations"); migrationBuilder.DropColumn( name: "IsBattlePassPeriod", table: "GameConfigurations"); migrationBuilder.DropColumn( name: "IsBeginnerMission", table: "GameConfigurations"); migrationBuilder.DropColumn( name: "TsRotationId", table: "GameConfigurations"); } } }