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

Use transactions #3

Open
bertoost opened this issue Mar 30, 2019 · 2 comments
Open

Use transactions #3

bertoost opened this issue Mar 30, 2019 · 2 comments

Comments

@bertoost
Copy link

Hi there!
First of all; great work! Just used it in a simple project to keep my database updates maintained via migrations and it worked instantly!

Maybe it's good to add PDO transaction while executing migrations. Since an error can be thrown during the update, it's useful to rollback() the changes so the migration can be fixed and re-applied (mostly while developing the migration).

This could also be a setting, to enable transaction. But basically it should be the default.

@fabiopaiva
Copy link
Owner

Hi Bert, thank you.

Keep in mind this project is not maintained for more than 3 years. Nowadays I'm not working with PHP anymore, provided that, feel free to send a PR.
I believe we just need to open the transaction in the files MigrationExecuteCommand.php and MigrationMigrateCommand.php but I'm not sure

@bertoost
Copy link
Author

bertoost commented Apr 1, 2019

Yeah I already tried to achieve it.
Didn't notice the inactivity :-) it still works great.
I currently use it for a demo project, but I can believe it could be useful for non-framework projects.

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

2 participants