Exception: ActiveRecord::ProtectedEnvironmentError
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::ProtectedEnvironmentError
- Defined in:
- activerecord/lib/active_record/migration.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(env = "production") ⇒ ProtectedEnvironmentError
constructor
A new instance of ProtectedEnvironmentError.
Constructor Details
#initialize(env = "production") ⇒ ProtectedEnvironmentError
Returns a new instance of ProtectedEnvironmentError.
195 196 197 198 199 200 |
# File 'activerecord/lib/active_record/migration.rb', line 195 def initialize(env = "production") msg = +"You are attempting to run a destructive action against your '#{env}' database.\n" 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 |