Skip to content

Unique copies and pages in the database

Hugo Kerstens requested to merge 138-unique-copy-exam into master

This MR:

  • Adds a read-only Copy._exam_id column. Updates automatically to Copy.submission.exam_id.
  • Adds a unique constraint for (Copy.number, Copy._exam_id).
  • Adds a unique constraint for (Page.number, Page.copy_id).
  • Alters the scans pipeline to catch and handle failed unique constraints gracefully.
  • Fixes the raw_scans pipeline to not commit an intermediate step, but flush instead.
  • Adds a naming convention for constraints.
  • Adds a migration for the changes above.
  • Fixes a bug in migrations with newer metadata.

Closes #138 (closed)

Edited by Hugo Kerstens

Merge request reports

Loading