Skip to content

Commit 028feab

Browse files
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 rails#24399.
1 parent 87c2c07 commit 028feab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/railties/databases.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ db_namespace = namespace :db do
302302
end
303303

304304
desc "Recreates the databases from the structure.sql file"
305-
task :load => [:environment, :load_config] do
305+
task :load => [:environment, :load_config, :check_protected_environments] do
306306
ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:sql, ENV['SCHEMA'])
307307
end
308308

0 commit comments

Comments
 (0)