S2OJ/web/app/upgrade/8_group_v2/up.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
404 B
SQL

RENAME TABLE assignments TO groups_assignments;
ALTER TABLE `assignments` DROP PRIMARY KEY, ADD PRIMARY KEY (`group_id`, `list_id`);
ALTER TABLE `assignments` DROP COLUMN `id`;
ALTER TABLE `groups_assignments` DROP COLUMN `create_time`;
ALTER TABLE `groups_assignments` CHANGE COLUMN `deadline` `end_time` datetime NOT NULL;
ALTER TABLE `countdowns` CHANGE COLUMN `endtime` `end_time` datetime NOT NULL;