Browse files

Created a pair of DB tables for groups and group membership.

Signed-off-by: Joe Baker <>
  • Loading branch information...
1 parent 3c6f993 commit 66cf26c317919fe2fd6930a5fbb6c36bd07bb2e9 @jbaker0428 committed Apr 16, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0
@@ -37,6 +37,13 @@ def createTables(self):
credit INTEGER,
current INTEGER)''')
+ cur.execute('CREATE TABLE IF NOT EXISTS groups (name TEXT PRIMARY KEY)')
+ cur.execute('''CREATE TABLE IF NOT EXISTS group_memberships
+ (student INTEGER NOT NULL REFERENCES students(id),
+ group TEXT NOT NULL REFERENCES groups(name),
+ PRIMARY KEY(student, group))''')
cur.execute('''CREATE TABLE IF NOT EXISTS absences
(student INTEGER REFERENCES students(id),
type TEXT,

0 comments on commit 66cf26c

Please sign in to comment.