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
BUGFIX: Stabilize doctrine migrations #3519
base: 7.3
Are you sure you want to change the base?
Conversation
How can I test this one? |
@bwaidelich Is similar required for pgsql? |
For Postgres, we have own migrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH: I am too lazy to try this out, so let me just ask: Not all migrations have up
and down
adjusted, is that correct? Does it work in both directions?
Haha, thanks for the honest reply :D I'll test down migration and take care of postgres and steps to reproduce asap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least the up migration part for MySQL works as expected, if this patch is applied.
Tested it in several cases (empty database, already existing flow project, where neos is added right now) and everytime everything was the way it should be. :)
if (in_array('typo3_flow_resource_resource', $tableNames, true) && in_array('typo3_typo3_domain_model_media_image', $tableNames, true)) { | ||
$this->addSql("ALTER TABLE typo3_typo3_domain_model_media_image ADD CONSTRAINT typo3_typo3_domain_model_media_image_ibfk_1 FOREIGN KEY (flow3_resource_resource) REFERENCES typo3_flow_resource_resource(flow3_persistence_identifier)"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other similar checks have an elseif
part, is that not needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least I can confirm that the difference to the "current" schema after a doctrine:migrate
has been the same in all cases.
Are we aware that even a fully migrated Neos CMS 7.3 creates new Migrations for two tables? (neos_contentrepository_domain_model_nodedata
and neos_media_domain_model_tag
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(but that's not the business of this PR ;) )
This targets an outdated branch, we can pick this one up again if issues pop up |
How about just retargeting it? The issue is valid even for 8.3 - which is no wonder, as the migrations usally do never change ;) |
I think something needs to be done, so I'll reopen and assign to myself. I'll check the needed things for 7.3 and up the coming two weeks If I don't, please nag me. |
@kdambekalns did your fix over here #4236 makes this obsolete? |
Related: #3118