490 lines
24 KiB
C#
490 lines
24 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SVSim.Database.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ProdContentTables : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "CardSetIdForResourceDlView",
|
|
table: "GameConfigurations",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "ChallengeTwoPickSleeveId",
|
|
table: "GameConfigurations",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "ChallengeUseTwoPickPremiumCard",
|
|
table: "GameConfigurations",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsBattlePassPeriod",
|
|
table: "GameConfigurations",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsBeginnerMission",
|
|
table: "GameConfigurations",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "TsRotationId",
|
|
table: "GameConfigurations",
|
|
type: "text",
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ArenaSeasons",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<int>(type: "integer", nullable: false),
|
|
Mode = table.Column<int>(type: "integer", nullable: false),
|
|
Enable = table.Column<int>(type: "integer", nullable: false),
|
|
Cost = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
|
RupyCost = table.Column<decimal>(type: "numeric(20,0)", nullable: false),
|
|
TicketCost = table.Column<int>(type: "integer", nullable: false),
|
|
IsJoin = table.Column<bool>(type: "boolean", nullable: false),
|
|
FormatInfo = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
LeaderSkinId = table.Column<int>(type: "integer", nullable: false),
|
|
BattleStartFirstPlayerTurnBp = table.Column<int>(type: "integer", nullable: false),
|
|
BattleStartSecondPlayerTurnBp = table.Column<int>(type: "integer", nullable: false),
|
|
BattleStartMaxLife = table.Column<int>(type: "integer", nullable: false),
|
|
AbilityCost = table.Column<string>(type: "text", nullable: false),
|
|
Ability = table.Column<string>(type: "text", nullable: false),
|
|
PassiveAbility = table.Column<string>(type: "text", nullable: false),
|
|
AbilityDesc = table.Column<string>(type: "text", nullable: false),
|
|
PassiveAbilityDesc = table.Column<string>(type: "text", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
ImageName = table.Column<string>(type: "text", nullable: false),
|
|
Click = table.Column<string>(type: "text", nullable: false),
|
|
Status = table.Column<string>(type: "text", nullable: false),
|
|
ChangeTime = table.Column<int>(type: "integer", nullable: false),
|
|
RemainingTime = table.Column<int>(type: "integer", nullable: false),
|
|
ImagePaths = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
Level = table.Column<int>(type: "integer", nullable: false),
|
|
RewardData = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
ColosseumId = table.Column<string>(type: "text", nullable: false),
|
|
ColosseumName = table.Column<string>(type: "text", nullable: false),
|
|
CardPoolName = table.Column<string>(type: "text", nullable: false),
|
|
DeckFormat = table.Column<string>(type: "text", nullable: false),
|
|
StartTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
EndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
NowRound = table.Column<string>(type: "text", nullable: false),
|
|
IsDisplayTips = table.Column<string>(type: "text", nullable: false),
|
|
TipsId = table.Column<string>(type: "text", nullable: false),
|
|
IsColosseumPeriod = table.Column<bool>(type: "boolean", nullable: false),
|
|
IsRoundPeriod = table.Column<bool>(type: "boolean", nullable: false),
|
|
IsNormalTwoPick = table.Column<string>(type: "text", nullable: false),
|
|
IsSpecialMode = table.Column<string>(type: "text", nullable: false),
|
|
IsAllCardEnabled = table.Column<int>(type: "integer", nullable: false),
|
|
SalesPeriodInfo = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
BonusId = table.Column<int>(type: "integer", nullable: false),
|
|
BonusData = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
DeckNo = table.Column<int>(type: "integer", nullable: false),
|
|
ClassId = table.Column<int>(type: "integer", nullable: false),
|
|
SleeveId = table.Column<long>(type: "bigint", nullable: false),
|
|
LeaderSkinId = table.Column<int>(type: "integer", nullable: false),
|
|
DeckName = table.Column<string>(type: "text", nullable: false),
|
|
CardIdArray = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
ClassId = table.Column<int>(type: "integer", nullable: false),
|
|
IsRandomLeaderSkin = table.Column<int>(type: "integer", nullable: false),
|
|
LeaderSkinId = table.Column<int>(type: "integer", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
FeatureKey = table.Column<string>(type: "text", nullable: false),
|
|
Data = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<long>(type: "bigint", nullable: false),
|
|
CardId = table.Column<long>(type: "bigint", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<long>(type: "bigint", nullable: false),
|
|
CardId = table.Column<long>(type: "bigint", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
PeriodNum = table.Column<int>(type: "integer", nullable: false),
|
|
NecessaryScore = table.Column<long>(type: "bigint", nullable: false),
|
|
BeginTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
EndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
AbilityId = table.Column<int>(type: "integer", nullable: false),
|
|
Data = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
RotationId = table.Column<int>(type: "integer", nullable: false),
|
|
CardSetIdsCsv = table.Column<string>(type: "text", nullable: false),
|
|
AbilitiesCsv = table.Column<string>(type: "text", nullable: false),
|
|
ReprintedCardIds = table.Column<string>(type: "jsonb", nullable: false),
|
|
RestrictedCardIds = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
PreReleaseId = table.Column<string>(type: "text", nullable: false),
|
|
NextCardSetId = table.Column<string>(type: "text", nullable: false),
|
|
StartTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
EndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DisplayEndTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
FreeMatchStartTime = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
CardMasterId = table.Column<int>(type: "integer", nullable: false),
|
|
DefaultCardMasterId = table.Column<string>(type: "text", nullable: false),
|
|
PreReleaseCardMasterId = table.Column<string>(type: "text", nullable: false),
|
|
IsPreRotationFreeMatchTerm = table.Column<bool>(type: "boolean", nullable: false),
|
|
RotationCardSetIdList = table.Column<string>(type: "jsonb", nullable: false),
|
|
ReprintedBaseCardIds = table.Column<string>(type: "jsonb", nullable: false),
|
|
LatestReprintedBaseCardIds = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<long>(type: "bigint", nullable: false),
|
|
CardId = table.Column<long>(type: "bigint", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<int>(type: "integer", nullable: false),
|
|
Enable = table.Column<int>(type: "integer", nullable: false),
|
|
CrystalCost = table.Column<int>(type: "integer", nullable: false),
|
|
RupyCost = table.Column<int>(type: "integer", nullable: false),
|
|
TicketCost = table.Column<int>(type: "integer", nullable: false),
|
|
DeckUsingNumMin = table.Column<int>(type: "integer", nullable: false),
|
|
ScheduleId = table.Column<int>(type: "integer", nullable: false),
|
|
IsJoin = table.Column<bool>(type: "boolean", nullable: false),
|
|
IsDeckCodeMaintenance = table.Column<bool>(type: "boolean", nullable: false),
|
|
PackInfo = table.Column<string>(type: "jsonb", nullable: false),
|
|
SalesPeriodInfo = table.Column<string>(type: "jsonb", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<long>(type: "bigint", nullable: false),
|
|
CardId = table.Column<long>(type: "bigint", nullable: false),
|
|
Cost = table.Column<int>(type: "integer", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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<long>(type: "bigint", nullable: false),
|
|
CardId = table.Column<long>(type: "bigint", nullable: false),
|
|
RestrictionValue = table.Column<int>(type: "integer", nullable: false),
|
|
DateCreated = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
DateUpdated = table.Column<DateTime>(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, "" });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
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");
|
|
}
|
|
}
|
|
}
|