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;