From b13b03521379cb71335fe1a2881b421f6c906d66 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 4 Feb 2023 18:24:57 +0800 Subject: [PATCH] chore: add upgrader for #36 --- db/app_uoj233.sql | 3 ++- web/app/upgrade/36_decimal_score_range/up.sql | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 web/app/upgrade/36_decimal_score_range/up.sql diff --git a/db/app_uoj233.sql b/db/app_uoj233.sql index 23a9cf3..870225a 100644 --- a/db/app_uoj233.sql +++ b/db/app_uoj233.sql @@ -994,7 +994,8 @@ INSERT INTO `upgrades` (`name`, `status`, `updated_at`) VALUES ('20_problem_difficulty', 'up', now()), ('21_problem_difficulty', 'up', now()), ('28_remote_judge', 'up', now()), - ('31_problem_resources', 'up', now()); + ('31_problem_resources', 'up', now()), + ('36_decimal_score_range', 'up', now()); /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; UNLOCK TABLES; diff --git a/web/app/upgrade/36_decimal_score_range/up.sql b/web/app/upgrade/36_decimal_score_range/up.sql new file mode 100644 index 0000000..ec0b8f6 --- /dev/null +++ b/web/app/upgrade/36_decimal_score_range/up.sql @@ -0,0 +1,4 @@ +ALTER TABLE `contests_submissions` MODIFY `score` DECIMAL(15, 10) NOT NULL; +ALTER TABLE `submissions` MODIFY `score` DECIMAL(15, 10) DEFAULT NULL; +ALTER TABLE `submissions` MODIFY `hidden_score` DECIMAL(15, 10) DEFAULT NULL; +ALTER TABLE `submissions_history` MODIFY `score` DECIMAL(15, 10) DEFAULT NULL;