From 7eed24e4c3b6952672cff23dea54df3be6a59d77 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Mon, 13 Feb 2023 20:33:39 +0800 Subject: [PATCH] chore: add upgrader for #41 --- db/app_uoj233.sql | 3 ++- web/app/upgrade/41_mail_notice/up.sql | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 web/app/upgrade/41_mail_notice/up.sql diff --git a/db/app_uoj233.sql b/db/app_uoj233.sql index 45fd58e..16bbb20 100644 --- a/db/app_uoj233.sql +++ b/db/app_uoj233.sql @@ -1025,7 +1025,8 @@ INSERT INTO `upgrades` (`name`, `status`, `updated_at`) VALUES ('28_remote_judge', 'up', now()), ('31_problem_resources', 'up', now()), ('36_decimal_score_range', 'up', now()), - ('40_contest_resources', 'up', now()); + ('40_contest_resources', 'up', now()), + ('41_mail_notice', 'up', now()); /*!40000 ALTER TABLE `upgrades` ENABLE KEYS */; UNLOCK TABLES; diff --git a/web/app/upgrade/41_mail_notice/up.sql b/web/app/upgrade/41_mail_notice/up.sql new file mode 100644 index 0000000..8ce0a26 --- /dev/null +++ b/web/app/upgrade/41_mail_notice/up.sql @@ -0,0 +1,12 @@ +CREATE TABLE `emails` ( + `id` int UNSIGNED NOT NULL AUTO_INCREMENT, + `receiver` varchar(20) NOT NULL, + `subject` varchar(100) NOT NULL, + `content` text NOT NULL, + `created_at` datetime NOT NULL, + `send_time` datetime DEFAULT NULL, + `priority` int NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + KEY `send_time` (`send_time`), + KEY `priority` (`priority`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;