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

Run migration and save migration version in single transaction #76

Merged
merged 1 commit into from Dec 4, 2023

Conversation

mariash
Copy link
Member

@mariash mariash commented Dec 1, 2023

What is this change about?

BBS runs each migration and saves latest migration version in the database. We want these operations to happens in a single transaction so that if saving migration version fails migration will not be applied and BBS will try to run migration again.

We found out that DDL changes in MySQL cannot be rolled back. So this will only be an improvement for Postgres databases. Next step we should add test to make sure migrations are idempotent.

How should this change be described in diego-release release notes?

BBS runs migration and saves its version in the same transaction

Tag your pair, your PM, and/or team!

@ameowlia
Thank you!

Signed-off-by: Amelia Downs <adowns@vmware.com>
Signed-off-by: Maria Shaldybin <mariash@vmware.com>
@mariash mariash requested a review from a team as a code owner December 1, 2023 01:14
@mariash mariash merged commit ecdd1f9 into main Dec 4, 2023
1 check passed
@jrussett jrussett deleted the migration-version-one-transaction branch January 25, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant