From ba3766144716f2ff1273ae7d1b8db8fd4b7861b1 Mon Sep 17 00:00:00 2001 From: Stefan Wrobel Date: Thu, 4 Jan 2024 08:45:06 -0800 Subject: [PATCH] Update to recommended placement of faster migrations config --- config/application.rb | 4 ---- config/environments/development.rb | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/config/application.rb b/config/application.rb index eae5d86..bf97e17 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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, diff --git a/config/environments/development.rb b/config/environments/development.rb index e01db2e..3494aeb 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -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 ||= "".freeze config.middleware.insert_before ActionDispatch::ShowExceptions, Rack::Toolbar,