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.
上级 87c2c070
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册