Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Postal Owl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Postal Owl
Postal Owl
Merge requests
!1
Student grading
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Student grading
student-grading
into
master
Overview
38
Commits
7
Changes
1
Merged
Martin Mareš
requested to merge
student-grading
into
master
4 years ago
Overview
31
Commits
7
Changes
1
0
0
Merge request reports
Viewing commit
72ffb8b3
Prev
Next
Show latest version
1 file
+
8
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
72ffb8b3
Student grading: Database support
· 72ffb8b3
Václav Končický
authored
4 years ago
db.ddl
+
8
−
1
View file @ 72ffb8b3
Edit in single-file editor
Open in Web IDE
Show full file
@@ -22,7 +22,8 @@ CREATE TABLE owl_courses (
cid serial PRIMARY KEY,
ident varchar(255) UNIQUE NOT NULL,
name varchar(255) NOT NULL,
enroll_token varchar(255) UNIQUE NOT NULL
enroll_token varchar(255) UNIQUE NOT NULL,
student_grading boolean NOT NULL DEFAULT FALSE
);
CREATE TABLE owl_enroll (
@@ -50,6 +51,12 @@ CREATE TABLE owl_topics (
UNIQUE(cid, ident)
);
CREATE TABLE owl_student_graders (
tid int NOT NULL REFERENCES owl_topics(tid) ON DELETE CASCADE,
uid int NOT NULL REFERENCES owl_users(uid) ON DELETE CASCADE,
UNIQUE(tid, uid)
);
CREATE TABLE owl_posts (
pid serial PRIMARY KEY,
tid int NOT NULL REFERENCES owl_topics(tid) ON DELETE CASCADE,
Loading