Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PsqlDosMigrator
: Commit changes when migrating existing schema
There was a bug in the `PsqlDosMigrator.migrate` method where the final step of migrating a database with a pre-existing schema to the latest schema version, would not be committed. This would manifest itself if a new database migration was added. When the user requested to migrate the storage, the migration would be performed, but since it wasn't committed as soon as the command terminated, the changes would be undone. The fix is to explicitly commit the changes in `migrate` after the final migration to the head version, by calling `Connection.commit`. A test is added to explicitly test the pathway of migrating a database with a pre-existing schema to the head version.
- Loading branch information