Exception: ActiveRecord::ProtectedEnvironmentError

Inherits:
ActiveRecordError show all
Defined in:
lib/active_record/migration.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(env = "production") ⇒ ProtectedEnvironmentError

Returns a new instance of ProtectedEnvironmentError.



162
163
164
165
166
167
# File 'lib/active_record/migration.rb', line 162

def initialize(env = "production")
  msg = "You are attempting to run a destructive action against your '#{env}' database.\n".dup
  msg << "If you are sure you want to continue, run the same command with the environment variable:\n"
  msg << "DISABLE_DATABASE_ENVIRONMENT_CHECK=1"
  super(msg)
end