Skip to content

Fix reversed logic for native UUID detection #297

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

Merged
merged 2 commits into from
Dec 20, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/dbal/DbalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function createDataBaseTable()
return;
}

if ($this->getDbalConnection()->getDatabasePlatform()->hasNativeGuidType()) {
if (!$this->getDbalConnection()->getDatabasePlatform()->hasNativeGuidType()) {
Copy link
Member

Choose a reason for hiding this comment

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

I guess this change would break MySql. Could you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed the check. That check should not be necessary in the first place because Doctrine will use the UUID column type if available, otherwise fall back to VARCHAR. One thing to take note of is that it may be necessary to add some code to #280 to detect and migrate the column type if you decide to merge that PR.

throw new \LogicException('The platform does not support UUIDs natively');
}

Expand Down