From 33bf07fdf73bb38abdefa2c0b0e5a2748e7bdde4 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Thu, 7 Apr 2016 09:50:09 +0200 Subject: [PATCH] Fix missing doctrine types --- bin/doctrine.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/doctrine.php b/bin/doctrine.php index 36a996a7ff..2453a33f2b 100644 --- a/bin/doctrine.php +++ b/bin/doctrine.php @@ -18,6 +18,7 @@ use Doctrine\ORM\Tools\Console\ConsoleRunner; use Symfony\Component\Console\Helper\HelperSet; +use Doctrine\DBAL\Types\Type; (@include_once __DIR__ . '/../vendor/autoload.php') || @include_once __DIR__ . '/../../../autoload.php'; @@ -42,6 +43,16 @@ if ( ! is_readable($configFile)) { exit(1); } +Type::overrideType( + Type::DATETIME, + Database::getUTCDateTimeTypeClass() +); + +Type::addType( + 'json', + 'Sonata\Doctrine\Types\JsonType' +); + $commands = array( new \Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand(), new \Doctrine\DBAL\Migrations\Tools\Console\Command\ExecuteCommand(),