Commit Graph

2 Commits

Author SHA1 Message Date
Alexey Bezhan
3a15a7e783 Set Template.hidden as nullable before the new app code gets released
Since the application code gets released after the migration setting
a new Template field as non-nullable prevents new templates from being
created by the existing application instances.

This splits the migration to set fields as nullable first and then
update existing records once the application code has been released.

0168 is modified not to run UPDATE query or set non-nullable flag in
staging and production. 0169 is added to rollback preview.
2018-02-26 10:46:20 +00:00
Alexey Bezhan
6d1439e39a Add a DB migration to create Templates.hidden column
Creates the column as nullable, sets the value to false for all
existing templates and template versions and then applies a
not-nullable constraint.

All future Templates are created with `False` as the default set
in SQLAlchemy.
2018-02-23 17:52:24 +00:00