update sql

This commit is contained in:
Himit_ZH 2021-11-24 21:48:33 +08:00
parent 71bd256b82
commit 36c6d9e67b
2 changed files with 31 additions and 0 deletions

View File

@ -300,3 +300,33 @@ DELIMITER ;
CALL contest_problem_Add_color ;
DROP PROCEDURE contest_problem_Add_color;
/*
* 2021.11.17 judge_server增加cf_submittable控制单台判题机只能一个账号提交CF
*/
DROP PROCEDURE
IF EXISTS judge_server_Add_cf_submittable;
DELIMITER $$
CREATE PROCEDURE judge_serverm_Add_cf_submittable ()
BEGIN
IF NOT EXISTS (
SELECT
1
FROM
information_schema.`COLUMNS`
WHERE
table_name = 'judge_server'
AND column_name = 'cf_submittable'
) THEN
ALTER TABLE `hoj`.`judge_server` ADD COLUMN `cf_submittable` BOOLEAN DEFAULT 1 NULL COMMENT '是否可提交CF';
END
IF ; END$$
DELIMITER ;
CALL judge_serverm_Add_cf_submittable ;
DROP PROCEDURE judge_serverm_Add_cf_submittable;

View File

@ -475,6 +475,7 @@ CREATE TABLE `judge_server` (
`max_task_number` int(11) NOT NULL COMMENT '判题并发最大数',
`status` int(11) DEFAULT '0' COMMENT '0可用1不可用',
`is_remote` tinyint(1) DEFAULT NULL COMMENT '是否开启远程判题vj',
`cf_submittable` tinyint(1) DEFAULT 1 NULL COMMENT '是否可提交CF',
`gmt_create` datetime DEFAULT CURRENT_TIMESTAMP,
`gmt_modified` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),