to run a destructive action against your 'production' database. If you are sure you want to continue, run the same command with the environment variable: DISABLE_DATABASE_ENVIRONMENT_CHECK=1
to run a destructive action against your 'production' database. If you are sure you want to continue, run the same command with the environment variable: DISABLE_DATABASE_ENVIRONMENT_CHECK=1
stored = ActiveRecord::Migrator.last_stored_environment if ActiveRecord::Migrator.protected_environment? raise ActiveRecord::ProtectedEnvironmentError.new(stored) end if stored && stored != current raise ActiveRecord::EnvironmentMismatchError.new(current: current, stored: stored) end end rescue ActiveRecord::NoDatabaseError end
stored = ActiveRecord::Migrator.last_stored_environment if ActiveRecord::Migrator.protected_environment? raise ActiveRecord::ProtectedEnvironmentError.new(stored) end if stored && stored != current raise ActiveRecord::EnvironmentMismatchError.new(current: current, stored: stored) end end rescue ActiveRecord::NoDatabaseError end