S2OJ/web/app/upgrade/8_group_v2/down.sql
Baoshuo f044ab8ed7
All checks were successful
continuous-integration/drone/push Build is passing
chore(web): update definition of groups_assignments
2022-10-22 06:34:12 +08:00

7 lines
447 B
SQL

RENAME TABLE groups_assignments TO assignments;
ALTER TABLE `assignments` ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `assignments` DROP PRIMARY KEY, ADD PRIMARY KEY (`id`);
ALTER TABLE `assignments` ADD COLUMN `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP;
ALTER TABLE `assignments` CHANGE COLUMN `end_time` `deadline` datetime NOT NULL;
ALTER TABLE `countdowns` CHANGE COLUMN `end_time` `endtime` datetime NOT NULL;