Skip to content

Commit

Permalink
Update load DB instructions (#115)
Browse files Browse the repository at this point in the history
1.7 migrations made dockstore the owner. When importing a
database that has already had the 1.7 migrations run, need
to load the tables with dockstore as the owner.
  • Loading branch information
Charles Overbeck authored and denis-yuen committed Dec 19, 2019
1 parent 0d41328 commit 9479763
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,16 @@ su - postgres
psql
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
ALTER DATABASE postgres OWNER to dockstore;
ALTER SCHEMA public OWNER to dockstore;
\quit
psql -f /tmp/backup.sql
psql postgres -U dockstore -f /tmp/backup.sql
# run migration using newly loaded DB
docker-compose down
nohup docker-compose up --force-recreate --remove-orphans &
```


Note that database migration is run once during the startup process and is controlled via the `DATABASE_GENERATED` variable. Answer `yes` if you are working as a developer and want to start work from scratch from an empty database. Answer `no` if you are working as an administrator and/or wish to start Dockstore from a production or staging copy of the database.

### Modifying the Database ###
Expand Down

0 comments on commit 9479763

Please sign in to comment.