Fixed charset on SQL dump from YAML schema#38
Conversation
|
Avoid having "DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci`" from https://github.com/doctrine/dbal/blob/3.10.x/src/Platforms/AbstractMySQLPlatform.php#L579-L600 when using `ibexa:doctrine:schema:dump-sql` on files like https://github.com/ibexa/oauth2-server/blob/main/src/bundle/Resources/config/schema.yaml or https://github.com/ibexa/shopping-list/blob/main/src/bundle/Resources/config/schema.yaml
7f6327c to
75fba3e
Compare
|
alongosz
left a comment
There was a problem hiding this comment.
@adriendupuis sorry for the delay with the review. The whole point of default table options was to avoid necessity of explicitly defining them for each table. I think the root cause of this issue is the fact that schema importer doesn't create a proper config.
I can give you more detailed instructions, but I need a simple steps to reproduce. Installing oauth2-server for this seems very complicated. If this is the only case which fails, then I'll try to do it, but please include some steps. Maybe there's more simple use case?
|
@alongosz Sorry for the late reply. I encountered this while doing You won't see the |
|



Description:
Inject the default table options into the schema imported from file.
It avoids having
DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci`from https://github.com/doctrine/dbal/blob/3.10.x/src/Platforms/AbstractMySQLPlatform.php#L579-L600 when usingibexa:doctrine:schema:dump-sqlon files like https://github.com/ibexa/oauth2-server/blob/main/src/bundle/Resources/config/schema.yaml or https://github.com/ibexa/shopping-list/blob/main/src/bundle/Resources/config/schema.yamlNotice that it might disappear by itself if we move to doctrine/dbal 4 as there is no hardcoded charset in https://github.com/doctrine/dbal/blob/4.4.x/src/Platforms/AbstractMySQLPlatform.php#L331-L337
For QA:
Documentation: