class ActiveRecord::EnvironmentMismatchError
Public Class Methods
new(current: nil, stored: nil)
click to toggle source
Calls superclass method
# File activerecord/lib/active_record/migration.rb, line 170 def initialize(current: nil, stored: nil) msg = "You are attempting to modify a database that was last run in `#{ stored }` environment.\n".dup msg << "You are running in `#{ current }` environment. " msg << "If you are sure you want to continue, first set the environment using:\n\n" msg << " bin/quails db:environment:set" if defined?(Quails.env) super("#{msg} RAILS_ENV=#{::Quails.env}\n\n") else super("#{msg}\n\n") end end