mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
Remove/recreate database via rake before restoring database
- --clean doesn't seem to work when the structure in the database we're loading doesn't match the structure of the database we have locally
This commit is contained in:
parent
915a4c1aaf
commit
d2443a10d3
2 changed files with 4 additions and 2 deletions
|
|
@ -9,10 +9,11 @@ TIMESTAMP=$(date +%s)
|
|||
DUMP_FILENAME=$APP.$TIMESTAMP.dump
|
||||
|
||||
## Uncomment this if you want the latest data
|
||||
# heroku pg:backups:capture
|
||||
#heroku pg:backups:capture --app=mciea-$APP
|
||||
heroku pg:backups:download --app=mciea-$APP --output=$DUMP_FILENAME
|
||||
|
||||
pg_restore --clean --no-acl --no-owner --dbname=mciea_development $DUMP_FILENAME
|
||||
bundle exec rake db:drop db:create
|
||||
pg_restore --no-acl --no-owner --dbname=mciea_development $DUMP_FILENAME
|
||||
|
||||
bundle exec rails db:environment:set RAILS_ENV=development
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue