Commit 0a963ee1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'pg_force_restore' into 'master'

Pg Force Restore
parents b2cab1c5 8fe10e64
......@@ -29,6 +29,8 @@ module Backup
print "Restoring MySQL database #{config['database']} ... "
system('mysql', *mysql_args, config['database'], in: db_file_name)
when "postgresql" then
puts "Destructively rebuilding database schema for RAILS_ENV #{Rails.env}"
Rake::Task["db:schema:load"].invoke
print "Restoring PostgreSQL database #{config['database']} ... "
pg_env
system('psql', config['database'], '-f', db_file_name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment