# Migrations

SQL:
INSERT INTO Games(GameId, Ruleset, TurnCount, GameSpeedType, MapSizeType, Map, StartEraType, StartTurn, VictorTeamId, VictoryType, LastPlayed) SELECT GameId, Ruleset, TurnCount, GameSpeedType, MapSizeType, Map, StartEraType, -1, VictorTeamId, VictoryType, LastPlayed from old.Games


SQL:
INSERT INTO Games(GameId, Ruleset, TurnCount, GameSpeedType, MapSizeType, Map, StartEraType, StartTurn, VictorTeamId, VictoryType, LastPlayed) SELECT GameId, Ruleset, TurnCount, GameSpeedType, MapSizeType, Map, StartEraType, StartTurn, VictorTeamId, VictoryType, LastPlayed from old.Games


SQL:
WITH RECURSIVE range(X,MaxX) AS (SELECT MIN(X),MAX(X) FROM Old.DataSetValues UNION ALL SELECT X+1,MaxX FROM range WHERE X < MaxX) INSERT INTO DataSetValues(DataSetId,X,Y) SELECT ds.DataSetId, r.X, (SELECT Y FROM Old.DataSetValues WHERE DataSetId = ds.DataSetId AND X = r.X) AS Y FROM (SELECT distinct DataSetId FROM Old.DataSetValues) ds, range r WHERE Y IS NOT (SELECT Y FROM Old.DataSetValues WHERE DataSetId = ds.DataSetId AND X = r.X - 1)


# GameDataPointValues

DataPoint: EnabledGameModes
ValueType: GAME_MODE_NAMES
ValueString:
{
    "modes": [
        {
            "name": "{\"LOC_GAMEMODE_BARBARIAN_CLANS_NAME\":[{\"locale\":\"en_US\",\"text\":\"Barbarian Clans Mode\"},{\"locale\":\"fr_FR\",\"text\":\"Mode Clans barbares\"},{\"locale\":\"de_DE\",\"text\":\"Barbaren-Clans-Modus\"},{\"locale\":\"it_IT\",\"text\":\"Modalità Clan di barbari\"},{\"locale\":\"es_ES\",\"text\":\"Modo Clanes bárbaros\"},{\"locale\":\"ja_JP\",\"text\":\"「蛮族の部族」モード\"},{\"locale\":\"ru_RU\",\"text\":\"Режим «Варварские кланы»\"},{\"locale\":\"pl_PL\",\"text\":\"Tryb barbarzyńskich klanów\"},{\"locale\":\"ko_KR\",\"text\":\"야만인 부족 모드\"},{\"locale\":\"zh_Hant_HK\",\"text\":\"蠻族部族模式\"},{\"locale\":\"zh_Hans_CN\",\"text\":\"蛮族氏族模式\"},{\"locale\":\"pt_BR\",\"text\":\"Modo Clãs Bárbaros\"}]}"
        }
    ]
}


