1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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.
This commit is contained in:
Prathamesh Sonpatki 2016-04-10 13:32:31 +05:30
parent 87c2c070c4
commit 028feab852
No known key found for this signature in database
GPG key ID: 8B90F6B89E2BCB71

View file

@ -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