From 9e660d8b3f6d15cb46550fce26e9e90c6bcc2850 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Sun, 16 Mar 2014 06:28:51 +0100 Subject: [PATCH] Fix binary string type --- lib/Alchemy/Phrasea/Model/Types/BinaryString.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/Alchemy/Phrasea/Model/Types/BinaryString.php b/lib/Alchemy/Phrasea/Model/Types/BinaryString.php index a9020d2ecf..c9b6788ada 100644 --- a/lib/Alchemy/Phrasea/Model/Types/BinaryString.php +++ b/lib/Alchemy/Phrasea/Model/Types/BinaryString.php @@ -30,6 +30,14 @@ class BinaryString extends Type return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration)." ". $platform->getCollationFieldDeclaration('utf8_bin'); } - throw new RuntimeException(sprintf('Type %s is not supported.', self::BINARY_STRING)); + return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); + } + + /** + * {@inheritdoc} + */ + public function getDefaultLength(AbstractPlatform $platform) + { + return $platform->getVarcharDefaultLength(); } }