This PR changes some fields on Sub and SubPost to disallow null, in cases where if the field is actually null (None) it violates assumptions elsewhere in the application and causes an exception to be thrown.
It includes a schema-only migration for the sub and sub_post tables to add these constraints. The failures are generally very obvious, so I think it’s probably unlikely that nulls exist in these columns in the wild. In any case, it’s not necessarily obvious what the right data migration would be in each case.
The commit message for 27fcca2 contains more information about the circumstances where having a null in a field causes a problem.
Thanks to @happy-river for their feedback in #366, from which this PR was extracted.
This PR changes some fields on
Sub
andSubPost
to disallow null, in cases where if the field is actually null (None
) it violates assumptions elsewhere in the application and causes an exception to be thrown.It includes a schema-only migration for the
sub
andsub_post
tables to add these constraints. The failures are generally very obvious, so I think it’s probably unlikely that nulls exist in these columns in the wild. In any case, it’s not necessarily obvious what the right data migration would be in each case.The commit message for 27fcca2 contains more information about the circumstances where having a null in a field causes a problem.
Thanks to @happy-river for their feedback in #366, from which this PR was extracted.