Skip to content

feat: no tx migration #3159

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

Closed
wants to merge 0 commits into from

Conversation

cleverjam
Copy link
Contributor

Does your PR solve an issue?

Yes, this change allows for a way to create migrations that will be executed outside of the postgres transaction block.

It works as described in this comment

fixes #767

@cleverjam cleverjam changed the title 767 no tx migration feat: no tx migration Mar 29, 2024
@abonander
Copy link
Collaborator

Would you be willing to discuss using a flag in a SQL comment as opposed to adding more semantics to filenames? I did bring that up as a concern in the linked comment.

I was thinking the parsing could be as simple as content.starts_with("-- no-transaction")

@cleverjam
Copy link
Contributor Author

Yeah that's cool too, I picked what I thought made more sense for me but like I said in the issue I am still very new to this project/rust and by no means thinking my way is the right way here, I'm happy to learn and help wherever I can.

I will update the change to use the comment in the file contents instead, please let me know if there are any other suggestions/feedback on the rest of the PR 🙂

@cleverjam
Copy link
Contributor Author

@abonander updated the change, let me know if this works

@cleverjam cleverjam closed this Apr 6, 2024
@cleverjam cleverjam force-pushed the 767-no-tx-migration branch from b5d8db6 to 3e7aa6b Compare April 6, 2024 16:14
@cleverjam cleverjam mentioned this pull request Apr 6, 2024
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.

Option to run migrations without a transaction
3 participants