2024-12-26 15:34:10 -05:00
|
|
|
# Mark existing migrations as safe
|
2025-01-22 09:06:35 -05:00
|
|
|
StrongMigrations.start_after = 20_250_122_150_500
|
2024-12-26 15:34:10 -05:00
|
|
|
|
|
|
|
|
# Set timeouts for migrations
|
|
|
|
|
# If you use PgBouncer in transaction mode, delete these lines and set timeouts on the database user
|
2025-11-07 14:02:51 -05:00
|
|
|
# Disable lock timeout in production/staging to avoid connection issues
|
|
|
|
|
StrongMigrations.lock_timeout = Rails.env.development? || Rails.env.test? ? 10.seconds : nil
|
2024-12-26 15:34:10 -05:00
|
|
|
StrongMigrations.statement_timeout = 1.hour
|
|
|
|
|
|
|
|
|
|
# Analyze tables after indexes are added
|
|
|
|
|
# Outdated statistics can sometimes hurt performance
|
|
|
|
|
StrongMigrations.auto_analyze = true
|
|
|
|
|
|
|
|
|
|
# Set the version of the production database
|
|
|
|
|
# so the right checks are run in development
|
|
|
|
|
# StrongMigrations.target_version = 10
|
|
|
|
|
|
|
|
|
|
# Add custom checks
|
|
|
|
|
# StrongMigrations.add_check do |method, args|
|
|
|
|
|
# if method == :add_index && args[0].to_s == "users"
|
|
|
|
|
# stop! "No more indexes on the users table"
|
|
|
|
|
# end
|
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
# Make some operations safe by default
|
|
|
|
|
# See https://github.com/ankane/strong_migrations#safe-by-default
|
|
|
|
|
# StrongMigrations.safe_by_default = true
|