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

Add warning about implicit commit to documentation #1382

Open
shylux opened this issue Dec 5, 2023 · 7 comments
Open

Add warning about implicit commit to documentation #1382

shylux opened this issue Dec 5, 2023 · 7 comments

Comments

@shylux
Copy link

shylux commented Dec 5, 2023

Q A
Version 3.7.1

Documentation Request

Hi i just spent a lot of time debugging why the rollback on our migrations don't seem to work.
Well the code looks good, but if it encounters an error the rollback never works because the transaction is gone.
From what i found out i am 90% sure it is because we use statements that do an implicit commit: https://dev.mysql.com/doc/refman/8.0/en/implicit-commit.html
The listed statements, especially ALTER TABLE are used in pretty much all migrations. And i am sure others will have the same issue.

I am not sure how many db softwares this affects. But it would be nice to have an info box here that warns about this behavior: https://www.doctrine-project.org/projects/doctrine-migrations/en/3.7/reference/configuration.html#all-or-nothing-transaction

@greg0ire
Copy link
Member

greg0ire commented Dec 5, 2023

@agustingomes
Copy link
Contributor

In all fairness, I think a reference to the explanation can be linked within the --all-or-nothing detail. because I believe not many people may be aware of the ramifications of the DB engines like MySQL not supporting transactional DDL.

I was also bitten by this lack of awareness when working on a migration last year, which then led to this PR and the subsequent ones I made.

Another thing I noticed, the Implicit commits sidebar only appears on the index page which may reduce the visibility as people may come from a google search, not landing on the index page.

@greg0ire
Copy link
Member

greg0ire commented Dec 6, 2023

Seems fair. Please send PRs to address these issues.

@agustingomes
Copy link
Contributor

I will look into it these days.

@agustingomes
Copy link
Contributor

@greg0ire how can I test the documentation changes locally? I cannot find any tooling locally.

@greg0ire
Copy link
Member

greg0ire commented Dec 6, 2023

Right now you can't, in the future you will be able to once we migrate to phpDocumentor/guides In the meantime, all you have is Github's preview, unless you're willing to install doctrine-website (which, while hard should be far easier than a few months ago)

@agustingomes
Copy link
Contributor

unless you're willing to install doctrine-website

I'll give it a go, because I think to implement my suggestionI'll need to understand why the explanation on the sidebar disappears on other pages besides the index.rst.

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