Commit 0a44f2be authored by Robert Czechowski's avatar Robert Czechowski

Remove old sqlite database migration files

parent fa2e829c
Pipeline #443 passed with stages
in 25 minutes and 30 seconds
CREATE TABLE contest (
id INTEGER PRIMARY KEY,
location TEXT NOT NULL,
filename TEXT NOT NULL,
name TEXT NOT NULL,
duration INTEGER NOT NULL,
public INTEGER NOT NULL,
start_date TEXT,
end_date TEXT
)
CREATE TABLE grade (
taskgroup INTEGER,
user INTEGER,
grade INTEGER,
validated INTEGER,
PRIMARY KEY (taskgroup, user)
)
CREATE TABLE usergroup (
id INTEGER PRIMARY KEY,
name TEXT,
groupcode TEXT,
tag TEXT,
admin INTEGER
)
CREATE TABLE participation (
contest INTEGER,
user INTEGER,
start_date TEXT,
PRIMARY KEY (contest, user)
)
CREATE TABLE session_user (
id INTEGER PRIMARY KEY,
session_token TEXT,
csrf_token TEXT,
last_login TEXT,
last_activity TEXT,
permanent_login INTEGER,
username TEXT,
password TEXT,
logincode TEXT,
email TEXT,
email_unconfirmed TEXT,
email_confirmationcode TEXT,
firstname TEXT,
lastname TEXT,
street TEXT,
zip TEXT,
city TEXT,
nation TEXT,
grade INTEGER,
is_teacher INTEGER,
managed_by INTEGER,
pms_id INTEGER,
pms_school_id INTEGER
)
CREATE TABLE submission (
id INTEGER PRIMARY KEY,
session_user INTEGER NOT NULL,
task INTEGER NOT NULL,
grade INTEGER NOT NULL,
validated INTEGER NOT NULL,
nonvalidated_grade INTEGER NOT NULL,
subtask_identifier TEXT,
value TEXT,
date TEXT
)
CREATE TABLE task (
id INTEGER PRIMARY KEY,
taskgroup INTEGER,
location TEXT,
stars INTEGER
)
CREATE TABLE taskgroup (
id INTEGER PRIMARY KEY,
contest INTEGER NOT NULL,
name TEXT NOT NULL
)
ALTER TABLE contest ADD COLUMN min_grade INTEGER;
ALTER TABLE contest ADD COLUMN max_grade INTEGER;
ALTER TABLE contest ADD COLUMN positionalnumber INTEGER;
ALTER TABLE session_user ADD COLUMN salt TEXT;
ALTER TABLE session_user ADD COLUMN oauth_foreign_id TEXT;
ALTER TABLE session_user ADD COLUMN oauth_provider TEXT;
UPDATE session_user SET (oauth_foreign_id, oauth_provider) = (pms_id, "pms") WHERE pms_id IS NOT NULL;
ALTER TABLE submission ADD COLUMN needs_validation INTEGER;
ALTER TABLE taskgroup ADD COLUMN positionalnumber INTEGER;
UPDATE session_user SET oauth_provider = "pms" WHERE oauth_foreign_id IS NOT NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment