Commit 0a963ee15a3c544fcf647ae94d348fe3369251c9
Exists in
spb-stable
and in
3 other branches
Merge branch 'pg_force_restore' into 'master'
Pg Force Restore
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
lib/backup/database.rb
... | ... | @@ -29,6 +29,8 @@ module Backup |
29 | 29 | print "Restoring MySQL database #{config['database']} ... " |
30 | 30 | system('mysql', *mysql_args, config['database'], in: db_file_name) |
31 | 31 | when "postgresql" then |
32 | + puts "Destructively rebuilding database schema for RAILS_ENV #{Rails.env}" | |
33 | + Rake::Task["db:schema:load"].invoke | |
32 | 34 | print "Restoring PostgreSQL database #{config['database']} ... " |
33 | 35 | pg_env |
34 | 36 | system('psql', config['database'], '-f', db_file_name) | ... | ... |