-
Notifications
You must be signed in to change notification settings - Fork 892
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
Start adding binaryuuid support. #1734
Conversation
This now works for MySQL already:
|
Tests are green so far except SQLite SQlite has some issues still uuid CREATE TABLE `tmp_ztable`
(`id` UUID_TEXT NOT NULL, PRIMARY KEY (`id`), `user_id` INTEGER NOT NULL) binaryuuid CREATE TABLE `tmp_ztable`
(`id` BINARY_BLOB NOT NULL, PRIMARY KEY (`id`), `user_id` INTEGER NOT NULL) |
The way SQLite creates those primary keys seems to be the issue
would be better but that is a different topic and not directly related to the changes here. I tested it also with CakePHP and migrations plugin, which now works correctly for all 3 db types: cakephp/migrations#331 |
For SQLServer, |
Codecov Report
@@ Coverage Diff @@
## master #1734 +/- ##
============================================
+ Coverage 76.78% 76.79% +0.01%
- Complexity 2026 2030 +4
============================================
Files 57 57
Lines 5902 5909 +7
============================================
+ Hits 4532 4538 +6
- Misses 1370 1371 +1
Continue to review full report at Codecov.
|
@MasterOdin For SqlServer it seems like UNIQUEIDENTIFIER could be the one to be used. |
@@ -56,6 +56,7 @@ class SQLiteAdapter extends PdoAdapter | |||
self::PHINX_TYPE_TEXT => 'text', | |||
self::PHINX_TYPE_TIME => 'time_text', | |||
self::PHINX_TYPE_UUID => 'uuid_text', | |||
self::PHINX_TYPE_BINARYUUID => 'binary_blob', |
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.
That seems to be the problem/wrong. See https://github.com/cakephp/migrations/issues/660
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.
uuid_blob is the correct one it seems
First stab at #1732
I might need some help, as I am not too familiar with the lower levels here.