Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init-database.js incompatible with restoring a database backup #191

Open
DavidBruant opened this issue Feb 10, 2016 · 2 comments
Open

init-database.js incompatible with restoring a database backup #191

DavidBruant opened this issue Feb 10, 2016 · 2 comments

Comments

@DavidBruant
Copy link
Contributor

Getting errors like ERROR: relation "networks" already exists.

The database must have no tables initially for the restore to work.

@DavidBruant
Copy link
Contributor Author

ERROR:  multiple primary keys for table "networks" are not allowed
ERROR:  multiple primary keys for table "places" are not allowed
ERROR:  relation "place_geo_index" already exists
ERROR:  trigger "updated_at_networks" for relation "networks" already exists
ERROR:  trigger "updated_at_places" for relation "places" already exists
ERROR:  constraint "places_network_fkey" for relation "places" already exists

@bleucitron
Copy link
Contributor

It doesn't... definitions in server/database/management/createTables.sql are not copied as is in the file dump, meaning you don't have the exceptions IF NOT EXISTS, which cause the errors.
Maybe there is a solution somewhere, will need to take a look at it, but this is minor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants