Column page.copy_id is missing NOT NULL constraint in migrations
In ancient times, the Page
table had a column submission_id
that linked it to a Submission
. For some reason, this column did not have a NOT NULL
constraint. When the Copy
table was added in this commit, submission_id
was replaced with copy_id
. This new column copy_id
did in fact get a NOT NULL
constraint in the database schema.
The constraint was necessary, but when the migrations needed the constraint the most, it disappeared:
We should create a migration script that adds this constraint. I've noticed that in the latest MRs (!278 (merged) and !288 (closed)) yarn dev:prepare-migration
detected this missing constraint.