From ecdb6f4f82db256c46be35cfb7871cd86eabcfff Mon Sep 17 00:00:00 2001 From: Marijn Huizendveld Date: Tue, 7 Aug 2012 00:51:33 +0200 Subject: [PATCH] Utilize native SQL field type declarations. Doctrine provides a method to get the platform independent SQL field declaration. --- composer.json | 2 +- src/Rhumsaa/Uuid/Doctrine/UuidType.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 997f5fd..b4622ca 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "php": ">=5.3.3" }, "require-dev": { - "doctrine/dbal": ">=2" + "doctrine/dbal": ">=2.3" }, "autoload": { "psr-0": {"Rhumsaa\\Uuid": "src/"} diff --git a/src/Rhumsaa/Uuid/Doctrine/UuidType.php b/src/Rhumsaa/Uuid/Doctrine/UuidType.php index 0117816..4c1fc5f 100644 --- a/src/Rhumsaa/Uuid/Doctrine/UuidType.php +++ b/src/Rhumsaa/Uuid/Doctrine/UuidType.php @@ -36,7 +36,7 @@ class UuidType extends Type */ public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform) { - return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + return $platform->getGuidTypeDeclartionSQL($fieldDeclaration); } /**