docbrown/config/initializers/strong_migrations.rb
Jamie Gaskins 32ee50f278
Fix Sitemap for tags (#14989)
Set a NOT NULL constraint on tags timestamps

This commit also monkeypatches in a method for StrongMigrations to
disable a check temporarily. This migration is safe enough for DEV (it's
not ideal, but it'll only lock the table for a matter of milliseconds),
so we'll be fine disabling it but we don't want to disable the check
globally for all migrations in case there's a migration where this is
not safe.
2021-10-08 15:25:04 -04:00

21 lines
608 B
Ruby

# https://github.com/ankane/strong_migrations#existing-migrations
StrongMigrations.start_after = 20_200_106_074_859
# https://github.com/ankane/strong_migrations#removing-an-index-non-concurrently
StrongMigrations.enable_check(:remove_index)
# https://github.com/ankane/strong_migrations#target-version
StrongMigrations.target_postgresql_version = 11
# https://github.com/ankane/strong_migrations#down-migrations--rollbacks
StrongMigrations.check_down = true
module StrongMigrations
def self.temporarily_disable_check(check)
disable_check check
yield
ensure
enable_check check
end
end