gems: add strong_migrations
This commit is contained in:
parent
1eebc2f1e1
commit
2e04435117
3 changed files with 30 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -80,6 +80,7 @@ gem 'sentry-ruby'
|
|||
gem 'sib-api-v3-sdk'
|
||||
gem 'skylight'
|
||||
gem 'spreadsheet_architect'
|
||||
gem 'strong_migrations' # lint database migrations
|
||||
gem 'typhoeus'
|
||||
gem 'warden'
|
||||
gem 'webpacker'
|
||||
|
|
|
@ -691,6 +691,8 @@ GEM
|
|||
actionpack (>= 5.2)
|
||||
activesupport (>= 5.2)
|
||||
sprockets (>= 3.0.0)
|
||||
strong_migrations (0.8.0)
|
||||
activerecord (>= 5.2)
|
||||
swd (1.3.0)
|
||||
activesupport (>= 3)
|
||||
attr_required (>= 0.0.5)
|
||||
|
@ -875,6 +877,7 @@ DEPENDENCIES
|
|||
spreadsheet_architect
|
||||
spring
|
||||
spring-commands-rspec
|
||||
strong_migrations
|
||||
timecop
|
||||
typhoeus
|
||||
vcr
|
||||
|
|
26
config/initializers/strong_migrations.rb
Normal file
26
config/initializers/strong_migrations.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
# Mark existing migrations as safe
|
||||
StrongMigrations.start_after = 20220315125851
|
||||
|
||||
# Set timeouts for migrations
|
||||
# If you use PgBouncer in transaction mode, delete these lines and set timeouts on the database user
|
||||
StrongMigrations.lock_timeout = 10.seconds
|
||||
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
|
Loading…
Reference in a new issue