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

How should I handle transactions in a good way? #405

Closed
jden123 opened this issue May 7, 2020 · 2 comments
Closed

How should I handle transactions in a good way? #405

jden123 opened this issue May 7, 2020 · 2 comments

Comments

@jden123
Copy link

jden123 commented May 7, 2020

Hello!

I have an up script that cleans up two tables and if the script fails the changes are to be rolled back. So, the queries should be run in a transaction.

Does RH handle this case? Could you please clarify if RH rolls back it automatically or I should deal with it manually.

Could you please clarify -t param?

@alexpantyukhin
Copy link

Up this issue! I'm interesting in rollaback on fail functionality also.

@erikbra
Copy link
Member

erikbra commented Oct 4, 2020

This should work, yes. That is what the -t parameter does. It is dependent on the database supporting it, though, but RoundhousE should issue a warning if the database provider does not support transactions.

I would recommend trying it, to be sure. Setting up a test case as you describe, shouldn't be too difficult.

@erikbra erikbra closed this as completed Oct 4, 2020
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

No branches or pull requests

3 participants