-
Notifications
You must be signed in to change notification settings - Fork 4
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
Database integrity (missing constraints) #189
Comments
To restore the database locally (vagrant) without errors/warnings I had to remove it and let postgres create the tables. dropdb --host=localhost --username=postgres publicdb
createdb --host=localhost --username=postgres publicdb
pg_restore --host=localhost --username=postgres --create --dbname=publicdb /vagrant/publicdb_dump.sql |
tomkooij
added a commit
that referenced
this issue
Feb 19, 2018
Instructions to restore (a copy of) the live database in a dev VM. See also #189
Ran into an issues because of this with the migration to remove pulseheight fits: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since the transition from MySQL to Postgres the database constraints have not been properly set.
This seems to be caused by the mysql to postgres tool which does not properly set the required constraints. See the two screenshots of the table structure (in Postico) of the inforecords.Cluster table.
The unique and foreign key constraints are not properly set in the live database. Although Django should take care of most of these automatically it would be wiser to have the database constraints properly set.
This will require some careful work, probably restoring from a dump. However, I had some trouble loading a dumped database into my local database with proper constraints... If I loaded the dumped data into a bare database (without tables) it went without issues.
Live database
Local newly migrated database
( @davidfokkema @tomkooij @kaspervd )
The text was updated successfully, but these errors were encountered: