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

Small fix to run migrations queries without a transaction #12

Merged
merged 3 commits into from
Feb 21, 2023

Conversation

frenchcomp
Copy link
Contributor

Add an option --no-transactions / -n to disable transaction to run migrations queries to fix #11

@@ -23,15 +23,15 @@ public function __construct(Connection $db, SchemaDefinition $schemaDefinition)
/**
* Update the database schema to match the schema definition.
*/
public function update(bool $force, OutputInterface $output): void
public function update(bool $force, OutputInterface $output, bool $withTransaction = false): void
Copy link
Owner

Choose a reason for hiding this comment

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

The default behavior will change to not use transactions. Could we preserve the existing behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but the initial PR was not change the default behavior, but you proposed to switch the default behavior : #12 (comment) Or want you just change behavior of options but not the method ?

Copy link
Owner

Choose a reason for hiding this comment

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

@frenchcomp OMG sorry 😅

I have so many prs and issues to track that I'm not remembering all the details, but thank you for clarifying! That sounds great then, I'll merge!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I understand, thanks you for the merge and yours works :)

@mnapoli mnapoli merged commit a923ed6 into mnapoli:master Feb 21, 2023
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.

"There is no active transaction" error with pdo and mariadb
2 participants