Generating the DB schema from the migrations resulted in a different schema than
the one currently in the repo. Generally, one shouldn't rerun all the
migrations but in this case the schema in the repo is also different from the
one used in production.
The different schema resulted in a few tests failing, due to null constraints
that were added not being used correctly.
This PR updates both the schema to be consistent with what is used in
production and updates the tests so that they don't fail due to these added
constraints. (It also fixes a linting error added recently.)
Generating the DB schema from the migrations resulted in a different schema than the one currently in the repo. Generally, one shouldn't rerun all the migrations but in this case the schema in the repo is also different from the one used in production.
The different schema resulted in a few tests failing, due to null constraints that were added not being used correctly.
This PR updates both the schema to be consistent with what is used in production and updates the tests so that they don't fail due to these added constraints. (It also fixes a linting error added recently.)