Skip to content

Development pre-release

Pre-release
Pre-release
Compare
Choose a tag to compare
@jdabtieu jdabtieu released this 07 Dec 16:22
· 876 commits to master since this release
fc8988e

Starting from the next release, all releases containing database changes will contain a migration script to automatically migrate data.

If your database format does not currently match the current database format, please rebuild your database. Alternatively, if your database schema looks similar enough to the current format and you feel comfortable manually making changes, you can do that as well. To verify, run SELECT sql FROM sqlite_master in sqlite and compare your output to the following:

CREATE TABLE 'submissions' ('sub_id' integer PRIMARY KEY NOT NULL, 'date' datetime NOT NULL, 'user_id' integer NOT NULL, 'problem_id' varchar(32) NOT NULL, 'contest_id' varchar(32), 'correct'  boolean NOT NULL)
CREATE TABLE 'contests' ('id' varchar(32) NOT NULL, 'name' varchar(256) NOT NULL, 'start' datetime NOT NULL, 'end' datetime NOT NULL, 'description' text, 'scoreboard_visible'  boolean NOT NULL DEFAULT (1))
CREATE TABLE 'problems_master' ('user_id' integer NOT NULL, [list of problems in the form 'problem id' boolean NOT NULL DEFAULT(0)])
CREATE TABLE '[some contest id]info' ('id' varchar(32) NOT NULL, 'name' varchar(256) NOT NULL, 'category' varchar(32) NOT NULL, 'flag' varchar(256) NOT NULL,'point_value' INTEGER NOT NULL DEFAULT (0)  , 'description' varchar(16384), 'hints' varchar(16384), 'draft' boolean NOT NULL DEFAULT(0))
CREATE TABLE 'users' ('id' integer PRIMARY KEY NOT NULL, 'username' varchar(20) NOT NULL, 'password' varchar(64) NOT NULL, 'email' varchar(128), 'join_date'  datetime NOT NULL DEFAULT (0), 'admin'  boolean NOT NULL DEFAULT (0), 'banned'  boolean NOT NULL DEFAULT (0)  , 'verified' boolean NOT NULL DEFAULT(0))
CREATE TABLE 'announcements' ('id' integer PRIMARY KEY NOT NULL, 'name' varchar(256) NOT NULL, 'date' datetime NOT NULL, 'description' varchar(16384) NOT NULL)
CREATE TABLE '[some contest id]' ('user_id' integer NOT NULL,'points' INTEGER NOT NULL DEFAULT (0), 'lastAC' datetime, [list of problems in the form 'problem id' boolean NOT NULL DEFAULT(0)])
CREATE TABLE "problems" ('id' varchar(64) NOT NULL, 'name' varchar(256) NOT NULL, 'point_value' integer NOT NULL DEFAULT (0), 'category' varchar(64), 'flag' varchar(256) NOT NULL, 'draft' boolean NOT NULL DEFAULT(0))