diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-04-10 13:32:31 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2016-04-10 13:32:31 +0530 |
commit | 028feab852e6aa3a17a4aff646db616c4fa7c608 (patch) | |
tree | 179b2571344f65eae1e27b471a30533a292a23db | |
parent | 87c2c070c4cf1b62ac364c53496a2da000fbf9d6 (diff) | |
download | rails-028feab852e6aa3a17a4aff646db616c4fa7c608.tar.gz rails-028feab852e6aa3a17a4aff646db616c4fa7c608.tar.bz2 rails-028feab852e6aa3a17a4aff646db616c4fa7c608.zip |
Check for protected environments before trying to load structure.sql file
- Check for protected environments while running `db:structure:load`
similar to how `db:schema:load` behaves.
- Followup of https://github.com/rails/rails/pull/24399.
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index b1b169ae2f..65c91855da 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -302,7 +302,7 @@ db_namespace = namespace :db do end desc "Recreates the databases from the structure.sql file" - task :load => [:environment, :load_config] do + task :load => [:environment, :load_config, :check_protected_environments] do ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:sql, ENV['SCHEMA']) end |