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 migrations in a transaction #4801

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

trinity-1686a
Copy link
Contributor

Description

fix #4746
we get an implementation of sqlx::Acquire is not general enough error. To get around that, we use the hidden run_direct, which is made specifically to go arround that error. See also launchbadge/sqlx#2016

How was this PR tested?

created 2 dummy migrations, one valid and one invalid. Verify the 1st one doesn't get committed because the 2nd failed.

we get an `implementation of sqlx::Acquire is not general enough` error
to get arround that, we use the hidden `run_direct`, which is made
specifically to go arround that error.
@trinity-1686a trinity-1686a requested a review from guilload March 27, 2024 11:26
Copy link
Member

@guilload guilload left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@trinity-1686a trinity-1686a enabled auto-merge (squash) March 27, 2024 15:35
@trinity-1686a trinity-1686a merged commit 261a946 into main Mar 27, 2024
4 checks passed
@trinity-1686a trinity-1686a deleted the trinity/migration-transaction branch March 27, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres migrations are not run in a transaction
2 participants