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

Use new column definition builder #329

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Dec 1, 2024

Related PR

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️
Fixed issues

Copy link

codecov bot commented Dec 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.51%. Comparing base (a56c69a) to head (4d647f3).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #329   +/-   ##
=========================================
  Coverage     98.51%   98.51%           
- Complexity      336      337    +1     
=========================================
  Files            23       23           
  Lines          1077     1079    +2     
=========================================
+ Hits           1061     1063    +2     
  Misses           16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -12,8 +12,7 @@ final class ColumnDefinitionBuilder extends AbstractColumnDefinitionBuilder
{
protected const AUTO_INCREMENT_KEYWORD = 'AUTOINCREMENT';

protected const GENERATE_UUID_EXPRESSION =
"(unhex(format('%016X', random() & 0xFFFFFFFFFFFF4FFF | 0x4000) || format('%016X', random() & 0xBFFFFFFFFFFFFFFF | 0xB000000000000000)))";
protected const GENERATE_UUID_EXPRESSION = '(randomblob(16))';

Copy link
Member

Choose a reason for hiding this comment

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

Is that v4 or v7? V7 is much preferred.

Copy link
Member Author

@Tigrov Tigrov Dec 11, 2024

Choose a reason for hiding this comment

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

It is not valid v4.
The previous valid v4 requires to update sqlite extension for php (unhex() requires new version of sqlite).

Copy link
Member

@samdark samdark left a comment

Choose a reason for hiding this comment

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

It is OK for now, but I'd add at least a guide on how to deal with UUIDv7 with every DB. Probably by generating it on PHP side...

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.

2 participants