1
0

0_post_deployment_migrations.rb 643 B

123456789101112131415
  1. # Post deployment migrations are included by default. This file must be loaded
  2. # before other initializers as Rails may otherwise memoize a list of migrations
  3. # excluding the post deployment migrations.
  4. unless ENV['SKIP_POST_DEPLOYMENT_MIGRATIONS']
  5. Rails.application.config.paths['db'].each do |db_path|
  6. path = Rails.root.join(db_path, 'post_migrate').to_s
  7. Rails.application.config.paths['db/migrate'] << path
  8. # Rails memoizes migrations at certain points where it won't read the above
  9. # path just yet. As such we must also update the following list of paths.
  10. ActiveRecord::Migrator.migrations_paths << path
  11. end
  12. end