Commit 2cc77b94 authored by Martin Mareš's avatar Martin Mareš
Browse files

DB: Identifiers of courses are scoped to semester

Closes #34.
parent 0b6968b4
......@@ -27,11 +27,12 @@ CREATE TABLE owl_semesters (
CREATE TABLE owl_courses (
cid serial PRIMARY KEY,
semid int NOT NULL REFERENCES owl_semesters(semid) ON DELETE CASCADE,
ident varchar(255) UNIQUE NOT NULL,
ident varchar(255) NOT NULL,
name varchar(255) NOT NULL,
enroll_token varchar(255) UNIQUE NOT NULL,
student_grading boolean NOT NULL DEFAULT FALSE,
anon_grading boolean NOT NULL DEFAULT FALSE
anon_grading boolean NOT NULL DEFAULT FALSE,
UNIQUE(semid, cid)
);
CREATE TABLE owl_enroll (
......
Supports Markdown
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