backend
backend copied to clipboard
Add foreign key constraints to model changsets
Where models have foreign keys that cannot be null, the tables should have appropriate constraints and
changesets should also validate this with Ecto.Changeset.foreign_key_constraint/3
.
See here for difference with Ecto.Changeset.assoc_constraint/3
.
Todo:
- Update changesets
- Add migrations
For the assessments context, this will be complete when #144 is merged. Not done yet for accounts/course contexts.
I asked Julius, and this is what he says:
Essentially we didn't really use course and accounts contexts so we haven't put them in
Someone just needs to check that the foreign key constraint has been added