From 97aeba20e5aab5fabe6bb76ce1b13baffaebea60 Mon Sep 17 00:00:00 2001 From: Raymonf Date: Wed, 1 Mar 2023 16:08:36 -0500 Subject: [PATCH 1/2] chuni: add missing columns for course mode --- core/data/schema/versions/SDHD_2_rollback.sql | 1 + core/data/schema/versions/SDHD_3_upgrade.sql | 1 + titles/chuni/schema/score.py | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 core/data/schema/versions/SDHD_2_rollback.sql create mode 100644 core/data/schema/versions/SDHD_3_upgrade.sql diff --git a/core/data/schema/versions/SDHD_2_rollback.sql b/core/data/schema/versions/SDHD_2_rollback.sql new file mode 100644 index 0000000..de11416 --- /dev/null +++ b/core/data/schema/versions/SDHD_2_rollback.sql @@ -0,0 +1 @@ +ALTER TABLE chuni_score_course DROP COLUMN theoryCount, DROP COLUMN orderId, DROP COLUMN playerRating; diff --git a/core/data/schema/versions/SDHD_3_upgrade.sql b/core/data/schema/versions/SDHD_3_upgrade.sql new file mode 100644 index 0000000..57498cc --- /dev/null +++ b/core/data/schema/versions/SDHD_3_upgrade.sql @@ -0,0 +1 @@ +ALTER TABLE chuni_score_course ADD theoryCount int(11), ADD orderId int(11), ADD playerRating int(11); diff --git a/titles/chuni/schema/score.py b/titles/chuni/schema/score.py index 353401f..81f3212 100644 --- a/titles/chuni/schema/score.py +++ b/titles/chuni/schema/score.py @@ -29,6 +29,9 @@ course = Table( Column("param3", Integer), Column("param4", Integer), Column("isClear", Boolean), + Column("theoryCount", Integer), + Column("orderId", Integer), + Column("playerRating", Integer), UniqueConstraint("user", "courseId", name="chuni_score_course_uk"), mysql_charset='utf8mb4' ) From b0bf151c9f868d3fca2eebc3ea43c8dd7941436e Mon Sep 17 00:00:00 2001 From: Raymonf Date: Wed, 1 Mar 2023 20:04:34 -0500 Subject: [PATCH 2/2] chuni: SDHD -> SDBT for upgrade scripts --- .../schema/versions/{SDHD_1_rollback.sql => SDBT_1_rollback.sql} | 0 .../schema/versions/{SDHD_2_rollback.sql => SDBT_2_rollback.sql} | 0 .../schema/versions/{SDHD_2_upgrade.sql => SDBT_2_upgrade.sql} | 0 .../schema/versions/{SDHD_3_upgrade.sql => SDBT_3_upgrade.sql} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename core/data/schema/versions/{SDHD_1_rollback.sql => SDBT_1_rollback.sql} (100%) rename core/data/schema/versions/{SDHD_2_rollback.sql => SDBT_2_rollback.sql} (100%) rename core/data/schema/versions/{SDHD_2_upgrade.sql => SDBT_2_upgrade.sql} (100%) rename core/data/schema/versions/{SDHD_3_upgrade.sql => SDBT_3_upgrade.sql} (100%) diff --git a/core/data/schema/versions/SDHD_1_rollback.sql b/core/data/schema/versions/SDBT_1_rollback.sql similarity index 100% rename from core/data/schema/versions/SDHD_1_rollback.sql rename to core/data/schema/versions/SDBT_1_rollback.sql diff --git a/core/data/schema/versions/SDHD_2_rollback.sql b/core/data/schema/versions/SDBT_2_rollback.sql similarity index 100% rename from core/data/schema/versions/SDHD_2_rollback.sql rename to core/data/schema/versions/SDBT_2_rollback.sql diff --git a/core/data/schema/versions/SDHD_2_upgrade.sql b/core/data/schema/versions/SDBT_2_upgrade.sql similarity index 100% rename from core/data/schema/versions/SDHD_2_upgrade.sql rename to core/data/schema/versions/SDBT_2_upgrade.sql diff --git a/core/data/schema/versions/SDHD_3_upgrade.sql b/core/data/schema/versions/SDBT_3_upgrade.sql similarity index 100% rename from core/data/schema/versions/SDHD_3_upgrade.sql rename to core/data/schema/versions/SDBT_3_upgrade.sql