dawarich/config/initializers/strong_migrations.rb

32 lines
1 KiB
Ruby
Raw Permalink Normal View History

2025-11-07 17:42:21 -05:00
# frozen_string_literal: true
2025-11-09 17:08:10 -05:00
# return unless Rails.env.development?
2025-11-09 17:08:10 -05:00
# # Mark existing migrations as safe
# StrongMigrations.start_after = 20_250_122_150_500
2025-11-09 17:08:10 -05:00
# # Set timeouts for migrations
# # PgBouncer in transaction mode doesn't support SET commands
# # Timeouts should be set on the database user instead
# # StrongMigrations.lock_timeout = 10.seconds
# # StrongMigrations.statement_timeout = 1.hour
2025-11-09 17:08:10 -05:00
# # Analyze tables after indexes are added
# # Outdated statistics can sometimes hurt performance
# StrongMigrations.auto_analyze = true
2025-11-09 17:08:10 -05:00
# # Set the version of the production database
# # so the right checks are run in development
# # StrongMigrations.target_version = 10
2025-11-07 17:42:21 -05:00
2025-11-09 17:08:10 -05:00
# # 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
2025-11-07 17:42:21 -05:00
2025-11-09 17:08:10 -05:00
# # Make some operations safe by default
# # See https://github.com/ankane/strong_migrations#safe-by-default
# # StrongMigrations.safe_by_default = true