Commit 82e3dcca authored by Robert Czechowski's avatar Robert Czechowski
Browse files

Add slight modificated sqlite db connector that is more similar to the postgres db connector

parent 1ea5514a
......@@ -11,10 +11,12 @@ license = "LGPL-3.0"
#maintenance = { status = "active-developed" }
[features]
default = ["rusqlite"]
complete = ["rusqlite", "postgres", "webbrowser"]
server = ["rusqlite", "postgres"]
desktop = ["rusqlite", "webbrowser"]
rusqlite_old = ["rusqlite"]
rusqlite_new = ["rusqlite"]
default = ["rusqlite_old"]
complete = ["rusqlite_old", "postgres", "webbrowser"]
server = ["rusqlite_old", "postgres"]
desktop = ["rusqlite_old", "webbrowser"]
watch = ["handlebars-iron/watch"]
strict = [] # Treat warnings as a build error
debug = []
......
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,
session INTEGER,
grade INTEGER,
validated INTEGER,
PRIMARY KEY (taskgroup, session)
)
CREATE TABLE usergroup (
id INTEGER PRIMARY KEY,
name TEXT,
groupcode TEXT,
tag TEXT,
admin INTEGER
)
CREATE TABLE participation (
contest INTEGER,
session INTEGER,
start_date TEXT,
PRIMARY KEY (contest, session)
)
CREATE TABLE session (
id INTEGER PRIMARY KEY,
session_token TEXT,
csrf_token TEXT,
last_login TEXT,
last_activity TEXT,
permanent_login INTEGER,
username TEXT,
password TEXT,
salt 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,
oauth_foreign_id TEXT,
oauth_provider TEXT
)
CREATE TABLE submission (
id INTEGER PRIMARY KEY,
session INTEGER NOT NULL,
task INTEGER NOT NULL,
grade INTEGER NOT NULL,
validated INTEGER NOT NULL,
needs_validation 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
)
#![cfg(feature = "rusqlite")]
#![cfg(feature = "rusqlite_old")]
extern crate rusqlite;
......
This diff is collapsed.
......@@ -23,7 +23,9 @@ extern crate urlencoded;
#[cfg(feature = "postgres")]
extern crate postgres;
#[cfg(feature = "rusqlite")]
#[cfg(feature = "rusqlite_old")]
extern crate rusqlite;
#[cfg(feature = "rusqlite_new")]
extern crate rusqlite;
#[cfg(feature = "webbrowser")]
extern crate webbrowser;
......@@ -38,6 +40,7 @@ pub mod oauth_provider;
mod db_apply_migrations;
mod db_conn_postgres;
mod db_conn_sqlite;
mod db_conn_sqlite_new;
mod db_objects;
mod webfw_iron;
......
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