Browse Source

Fix json type error in bin/doctrine.php see BT#13859

Julio 7 years ago
parent
commit
5041bb4f10
1 changed files with 6 additions and 4 deletions
  1. 6 4
      bin/doctrine.php

+ 6 - 4
bin/doctrine.php

@@ -47,10 +47,12 @@ Type::overrideType(
     Database::getUTCDateTimeTypeClass()
 );
 
-/*Type::addType(
-    'json',
-    'Sonata\Doctrine\Types\JsonType'
-);*/
+if (!Type::hasType('json')) {
+    Type::addType(
+        'json',
+        'Sonata\Doctrine\Types\JsonType'
+    );
+}
 
 $commands = array(
     new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(),