Step1)比較兩種資料表,發現DMOJ4.0多出資料表judge_class、judge_class_admins、judge_class_members、judge_contest_authors、judge_contest_classes、judge_contest_curators、judge_contest_join_organizations、judge_contest_organizers。
資料表judge_comment多出欄位`revisions` int(11) NOT NULL
資料表judge_contest多出欄位`points_precision` int(11) NOT NULL,
`scoreboard_visibility` varchar(1) NOT NULL,
`locked_after` datetime(6) DEFAULT NULL,
`hide_problem_authors` tinyint(1) NOT NULL,
`show_short_display` tinyint(1) NOT NULL,
`tester_see_scoreboard` tinyint(1) NOT NULL,
`limit_join_organizations` tinyint(1) NOT NULL,
`tester_see_submissions` tinyint(1) NOT NULL,
`performance_ceiling_override` int(11) DEFAULT NULL等欄位,無法從DMOJ2.1直接備份資料庫,還原到DMOJ4.0資料庫
Step2)抓取出DMOJ2.1的題目與測資,手動新增到DMOJ4.0
首先備份DMOJ2.1的資料庫出來,還原到XAMPP,可以避免修改到原來資料庫。
備份
#mysqldump -u user -p dmoj >dmoj.sql
還原
#mysql -u user -p dmoj < dmoj.sql
Step3)將資料庫每一個題目備份到一個檔案,透過Google AI寫程式