Skip to content

Commit

Permalink
Update to recommended placement of faster migrations config
Browse files Browse the repository at this point in the history
  • Loading branch information
swrobel committed Jan 4, 2024
1 parent 16c6c0e commit ba37661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ class Application < Rails::Application
end
end

# Faster migrations: https://github.com/ankane/strong_migrations#faster-migrations
ActiveRecord.dump_schema_after_migration = Rails.env.development? &&
`git status db/migrate/ --porcelain`.present?

DIRECTION_MAPPING = {
'N' => 0,
'NNE' => 22.5,
Expand Down
3 changes: 3 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true

# Faster migrations: https://github.com/ankane/strong_migrations#faster-migrations
config.active_record.dump_schema_after_migration = `git status db/migrate/ --porcelain`.present?

dev_server = Shakapacker.config.dev_server
WEBPACK_SCRIPT_TAG ||= "<script src='#{"http#{dev_server[:https] && 's'}"}://#{dev_server[:host]}:#{dev_server[:port]}/webpack-dev-server.js'></script>".freeze
config.middleware.insert_before ActionDispatch::ShowExceptions, Rack::Toolbar,
Expand Down

0 comments on commit ba37661

Please sign in to comment.