Add default database values for UserPreference model
In !102897 (merged) we've replaced default_value_for
with Rails native implementation. The database allows NULL values and there are a few million records with NULL values. We should backfill those columns with default column values, set a column default with NOT NULL constraints, and corresponding model behaviour.
Implementation plan
- Create migration for setting default value of columns.
- Migration for backfilling of columns with null values to the default value. To be tackled in this issue.
- Model changes to add default database values for UserPreference model. To be tackled in this issue.
Edited by Christina Lohr