propelorm / Propel2

Propel2 is an open-source high-performance Object-Relational Mapping (ORM) for modern PHP
http://propelorm.org/
MIT License
1.26k stars 393 forks source link

UUID adjustments for mariadb #1924

Closed mringler closed 1 year ago

mringler commented 1 year ago

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 commented 1 year ago

Codecov Report

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

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 ```diff @@ 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%)` | :arrow_up: | | 7.4 | `88.36% <100.00%> (+15.11%)` | :arrow_up: | | agnostic | `67.43% <100.00%> (?)` | | | mysql | `68.96% <90.00%> (+<0.01%)` | :arrow_up: | | pgsql | `69.05% <93.33%> (+<0.01%)` | :arrow_up: | | sqlite | `66.97% <90.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/propelorm/Propel2/pull/1924?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | Coverage Δ | | |---|---|---| | [src/Propel/Generator/Reverse/MysqlSchemaParser.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvUmV2ZXJzZS9NeXNxbFNjaGVtYVBhcnNlci5waHA=) | `88.26% <ø> (ø)` | | | [src/Propel/Common/Config/PropelConfiguration.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9Db21tb24vQ29uZmlnL1Byb3BlbENvbmZpZ3VyYXRpb24ucGhw) | `100.00% <100.00%> (+0.32%)` | :arrow_up: | | [src/Propel/Generator/Model/Column.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvTW9kZWwvQ29sdW1uLnBocA==) | `96.40% <100.00%> (+15.75%)` | :arrow_up: | | [src/Propel/Generator/Model/Table.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvTW9kZWwvVGFibGUucGhw) | `91.59% <100.00%> (+18.12%)` | :arrow_up: | | [src/Propel/Generator/Platform/DefaultPlatform.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvUGxhdGZvcm0vRGVmYXVsdFBsYXRmb3JtLnBocA==) | `93.92% <100.00%> (+30.96%)` | :arrow_up: | | [src/Propel/Generator/Platform/MysqlPlatform.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvUGxhdGZvcm0vTXlzcWxQbGF0Zm9ybS5waHA=) | `94.78% <100.00%> (+8.89%)` | :arrow_up: | | [src/Propel/Generator/Platform/PgsqlPlatform.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvUGxhdGZvcm0vUGdzcWxQbGF0Zm9ybS5waHA=) | `97.46% <100.00%> (+9.17%)` | :arrow_up: | | [src/Propel/Generator/Platform/SqlitePlatform.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvUGxhdGZvcm0vU3FsaXRlUGxhdGZvcm0ucGhw) | `92.52% <100.00%> (+2.90%)` | :arrow_up: | | [...nerator/Builder/Om/TableMapLoaderScriptBuilder.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvQnVpbGRlci9PbS9UYWJsZU1hcExvYWRlclNjcmlwdEJ1aWxkZXIucGhw) | `95.12% <0.00%> (-2.38%)` | :arrow_down: | | [src/Propel/Generator/Command/InitCommand.php](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm#diff-c3JjL1Byb3BlbC9HZW5lcmF0b3IvQ29tbWFuZC9Jbml0Q29tbWFuZC5waHA=) | `72.12% <0.00%> (-1.34%)` | :arrow_down: | | ... and [124 more](https://codecov.io/gh/propelorm/Propel2/pull/1924/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm) | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=propelorm)

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