From 95fb3b507a5cd424feabe3e70280102833c50a3d Mon Sep 17 00:00:00 2001 From: hewenyang Date: Sun, 25 Feb 2018 19:55:53 +0800 Subject: [PATCH] Update README.md and add upgrade instructions --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index aa467cc..ce95eb7 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ An OnlineJudge System for OI. The UI is powered by [Semantic UI](http://semantic-ui.com/). Template designed & coded by [Sengxian](https://www.sengxian.com) and [Menci](https://men.ci). +# Upgrading +Because of an update to the database structure, users who upgrade from a commit BEFORE 4c673956959532d61b8f9ba0be3191a054b4371a **MUST** perform the following SQL on the database: +```sql +ALTER TABLE `judge_state` ADD `is_public` TINYINT(1) NOT NULL AFTER `compilation`; +UPDATE `judge_state` JOIN `problem` ON `problem`.`id` = `judge_state`.`problem_id` SET `judge_state`.`is_public` = `problem`.`is_public`; +ALTER TABLE `syzoj`.`judge_state` ADD INDEX `judge_state_is_public` (`id`, `is_public`, `type_info`, `type`); +``` + # Deploying **Warning** The following content is **outdated**. Please refer to https://syzoj-demo.t123yh.xyz:20170/article/1 for a detailed guide and a demo server.