-
Notifications
You must be signed in to change notification settings - Fork 1
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
Resynch database sequences after backup restore #85
Labels
bug
Something isn't working
Comments
Implemented a solution that works in PostgreSQL, but not in H2. When we try to insert a new record and a primary key conflict happens, we increment the sequence in a recursive call until it doesn't conflict with the primary key anymore. A solution for H2 is yet to be found. We may need to create the sequences manually or change the backup file from SQL to JSON. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The implemented database backup is based on SQL scripts. It allows recovering the database without the application being up and running. However, it makes sequences get out of synch, causing issues with inserting new records due to primary-key conflicts.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We expect sequences to be in sync with primary keys.
The text was updated successfully, but these errors were encountered: