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

UUID adjustments for mariadb #1924

Merged

Conversation

mringler
Copy link
Contributor

Allows to use native uuid type on MariaDB by enabling it in the propel configuration:

propel:
    adapters:
      mysql:
        uuidColumnType: native # <------ here

While the actual change is quite small, I had to went through a lot of places to find a suitable entry point. I had to refactor some methods along the way, and I think it is best to keep these changes. I have put them in different commits if this helps reviewing!

Also, this includes #1922 , agnostic tests are running

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2022

Codecov Report

Base: 73.25% // Head: 88.36% // Increases project coverage by +15.11% 🎉

Coverage data is based on head (60873cc) compared to base (b542279).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@              Coverage Diff              @@
##             master    #1924       +/-   ##
=============================================
+ Coverage     73.25%   88.36%   +15.11%     
- Complexity     7917     7922        +5     
=============================================
  Files           227      227               
  Lines         21133    21156       +23     
=============================================
+ Hits          15480    18694     +3214     
+ Misses         5653     2462     -3191     
Flag Coverage Δ
5-max 88.36% <100.00%> (+15.11%) ⬆️
7.4 88.36% <100.00%> (+15.11%) ⬆️
agnostic 67.43% <100.00%> (?)
mysql 68.96% <90.00%> (+<0.01%) ⬆️
pgsql 69.05% <93.33%> (+<0.01%) ⬆️
sqlite 66.97% <90.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Propel/Generator/Reverse/MysqlSchemaParser.php 88.26% <ø> (ø)
src/Propel/Common/Config/PropelConfiguration.php 100.00% <100.00%> (+0.32%) ⬆️
src/Propel/Generator/Model/Column.php 96.40% <100.00%> (+15.75%) ⬆️
src/Propel/Generator/Model/Table.php 91.59% <100.00%> (+18.12%) ⬆️
src/Propel/Generator/Platform/DefaultPlatform.php 93.92% <100.00%> (+30.96%) ⬆️
src/Propel/Generator/Platform/MysqlPlatform.php 94.78% <100.00%> (+8.89%) ⬆️
src/Propel/Generator/Platform/PgsqlPlatform.php 97.46% <100.00%> (+9.17%) ⬆️
src/Propel/Generator/Platform/SqlitePlatform.php 92.52% <100.00%> (+2.90%) ⬆️
...nerator/Builder/Om/TableMapLoaderScriptBuilder.php 95.12% <0.00%> (-2.38%) ⬇️
src/Propel/Generator/Command/InitCommand.php 72.12% <0.00%> (-1.34%) ⬇️
... and 124 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

$this->tableEngineKeyword = $tableEngineKeyword;
}
if ($uuidColumnType = $mysqlConfig['uuidColumnType']) {
$enable = strtolower($uuidColumnType) === 'native';

Choose a reason for hiding this comment

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

[Minor] Wouldn't be better to have a standalone platform for MariaDb that extends a MySQL one?

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, that would be great, but that is its own PR

@dereuromark dereuromark changed the title Feature/UUID adjustments for mariadb UUID adjustments for mariadb Dec 19, 2022
@dereuromark dereuromark merged commit 49dc1ba into propelorm:master Dec 19, 2022
nicolanrizzo added a commit to nicolanrizzo/PropelBundle that referenced this pull request Apr 25, 2024
nicolanrizzo added a commit to nicolanrizzo/PropelBundle that referenced this pull request Apr 25, 2024
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.

4 participants