-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb:check_protected_environments
executable file
·20 lines (20 loc) · 2.26 KB
/
db:check_protected_environments
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
D, [2017-06-06T04:09:57.059601 #4] DEBUG -- : [1m[36mActiveRecord::SchemaMigration Load (1.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
D, [2017-06-06T04:09:57.092404 #4] DEBUG -- : [1m[35m (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", :environment]]
D, [2017-06-06T04:09:57.095306 #4] DEBUG -- : [1m[36mActiveRecord::SchemaMigration Load (1.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
D, [2017-06-06T04:09:57.098529 #4] DEBUG -- : [1m[35m (0.7ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", :environment]]
D, [2017-06-06T04:09:57.104663 #4] DEBUG -- : [1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
D, [2017-06-06T04:09:57.111327 #4] DEBUG -- : [1m[35m (4.0ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", :environment]]
rails aborted!
ActiveRecord::ProtectedEnvironmentError: You are attempting 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
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:51:in `check_protected_environments!'
/app/vendor/bundle/ruby/2.4.0/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:11:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:14:in `block in run_rake_task'
/app/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands/rake_proxy.rb:11:in `run_rake_task'
/app/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands/commands_tasks.rb:51:in `run_command!'
/app/vendor/bundle/ruby/2.4.0/gems/railties-5.0.2/lib/rails/commands.rb:18:in `<top (required)>'
/app/bin/rails:9:in `require'
/app/bin/rails:9:in `<main>'
Tasks: TOP => db:migrate:reset => db:drop => db:check_protected_environments
(See full trace by running task with --trace)