提交 5e21f81a 编写于 作者: J Jerry Cheung

Prevent db:schema:load to protected environments

Follow up to https://github.com/rails/rails/pull/22967 to protect against
loading a schema on accident in production.

cc @schneems
上级 863d3850
......@@ -256,7 +256,7 @@ db_namespace = namespace :db do
end
desc 'Loads a schema.rb file into the database'
task :load => [:environment, :load_config] do
task :load => [:environment, :load_config, :check_protected_environments] do
ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA'])
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册