-
- Downloads
Fix old migrations failing because of strong_migrations update (#12692)
Fixes #12690 The `strong_migrations` update from ba2eac88 introduced a check for `change_column_null` specific to Postgres. This rejects old migrations. This commit just wraps old migrations with `safety_assured` to bypass this check. Alternatives would have been to: - Disable that check entirely (a possibility added in that same `strong_migrations` version) for Mastodon, but it makes sense to write new migrations without such a strong lock. - Rewrite the old migrations to do it in a way that do not require an exclusive lock. I thought fixing those old migrations for performance wasn't worth the pain. Also, if I understand correctly, the next version of `strong_migrations` is going to include a helper to do that. We could update those migrations at that point.
Showing
- db/migrate/20170711225116_fix_null_booleans.rb 11 additions, 9 deletionsdb/migrate/20170711225116_fix_null_booleans.rb
- db/migrate/20171010025614_change_accounts_nonnullable_in_account_moderation_notes.rb 4 additions, 2 deletions...hange_accounts_nonnullable_in_account_moderation_notes.rb
- db/migrate/20171201000000_change_account_id_nonnullable_in_lists.rb 3 additions, 1 deletion.../20171201000000_change_account_id_nonnullable_in_lists.rb
- db/migrate/20180310000000_change_columns_in_notifications_nonnullable.rb 6 additions, 4 deletions...0310000000_change_columns_in_notifications_nonnullable.rb
Please register or sign in to comment