   `updated_at` DATETIME COMMENT 'Time when the quiz submission was last updated.',
   `started_at` DATETIME COMMENT 'Time at which the student started the quiz submission.',
   `finished_at` DATETIME COMMENT 'Time at which the student submitted the quiz submission.',
-  `due_at` DATETIME COMMENT 'Time at which the quiz submission will be overdue, and will be flagged as a late submission.'
+  `due_at` DATETIME COMMENT 'Time at which the quiz submission will be overdue, and will be flagged as a late submission.',
+PRIMARY KEY (id)
 ) COMMENT = "Attributes for all submitted quizzes";
 DROP TABLE IF EXISTS quiz_submission_historical_fact;
 CREATE TABLE IF NOT EXISTS quiz_submission_historical_fact (

  `points_possible` DOUBLE COMMENT 'Total points possible for the assignment',
  `grading_type` VARCHAR(256) COMMENT 'Describes how the assignment will be graded (gpa_scale, pass_fail, percent, points, not_graded, letter_grade)',
  `submission_types` VARCHAR(256) COMMENT 'Comma separated list of valid methods for submitting the assignment (online_url, media_recording, online_upload, online_quiz, external_tool, online_text_entry, online_file_upload)',
  `workflow_state` VARCHAR(256) COMMENT 'Current workflow state of the assignment.  Possible values are unpublished, published and deleted',
  `created_at` DATETIME COMMENT 'Timestamp of the first time the assignment was entered into the system',
  `updated_at` DATETIME COMMENT 'Timestamp of the last time the assignment was updated',
  `peer_review_count` INTEGER UNSIGNED COMMENT 'The number of pears to assign for review if using algorithmic assignment',

  `exact` DOUBLE COMMENT '(Used in \'numerical_question\' with answer type \'exact_answer\', set to \'NULL\' otherwise) Value the answer must be equal to.',
  `margin` DOUBLE COMMENT '(Used in \'numerical_question\' with answer type \'exact_answer\', set to \'NULL\' otherwise) Margin of error allowed for a student\'s answer.',
  `starting_range` DOUBLE COMMENT '(Used in \'numerical_question\' with answer type \'range_answer\', set to \'NULL\' otherwise) Start of the allowed range (inclusive).',
  `ending_range` DOUBLE COMMENT '(Used in \'numerical_question\' with answer type \'range_answer\', set to \'NULL\' otherwise) End of the allowed range (inclusive).',
PRIMARY KEY (id,quiz_question_id)
) COMMENT = "Attributes of an answer related to a quiz question.";
DROP TABLE IF EXISTS quiz_question_answer_fact;
CREATE TABLE IF NOT EXISTS quiz_question_answer_fact (
