Skip to content

Commit

Permalink
Merge b4f3cae into 05b6007
Browse files Browse the repository at this point in the history
  • Loading branch information
yeej2 authored May 2, 2019
2 parents 05b6007 + b4f3cae commit 79d8194
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions application/db_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def db_init():
# Create table - people
c.execute(
"""CREATE TABLE people(
person_id INTEGER PRIMARY KEY,
person_id INTEGER PRIMARY KEY AUTOINCREMENT,
isTeacher INTEGER,
username TEXT,
password TEXT,
Expand All @@ -31,7 +31,7 @@ def db_init():
# Create table - classes
c.execute(
"""CREATE TABLE classes(
class_id INTEGER PRIMARY KEY,
class_id INTEGER PRIMARY KEY AUTOINCREMENT,
teacher_id INTEGER,
name TEXT,
FOREIGN KEY(teacher_id)
Expand All @@ -41,7 +41,7 @@ def db_init():

c.execute(
"""CREATE TABLE quizzes(
quiz_id INTEGER PRIMARY KEY,
quiz_id INTEGER PRIMARY KEY AUTOINCREMENT,
creator_id INTEGER,
class_id INTEGER,
name TEXT,
Expand All @@ -55,7 +55,7 @@ def db_init():

c.execute(
"""CREATE TABLE roster(
roster_id INTEGER PRIMARY KEY,
roster_id INTEGER PRIMARY KEY AUTOINCREMENT,
person_id INTEGER,
class_id INTEGER,
FOREIGN KEY(person_id)
Expand All @@ -67,7 +67,7 @@ def db_init():

c.execute(
"""CREATE TABLE questions(
question_id INTEGER PRIMARY KEY,
question_id INTEGER PRIMARY KEY AUTOINCREMENT,
quiz_id INTEGER,
question_type INTEGER,
question_text TEXT,
Expand All @@ -83,7 +83,7 @@ def db_init():

c.execute(
"""CREATE TABLE quiz_grades(
grade_id INTEGER PRIMARY KEY,
grade_id INTEGER PRIMARY KEY AUTOINCREMENT,
student_id INTEGER,
quiz_id INTEGER,
grade TEXT,
Expand All @@ -96,7 +96,7 @@ def db_init():

c.execute(
"""CREATE TABLE quiz_responses(
response_id INTEGER PRIMARY KEY,
response_id INTEGER PRIMARY KEY AUTOINCREMENT,
student_id INTEGER,
quiz_id INTEGER,
question_id INTEGER,
Expand Down
Binary file modified data/quizagator.db
Binary file not shown.

0 comments on commit 79d8194

Please sign in to comment.