Force comments on the JsonArrayType

And then we don't need to wait till v3 to not require comments on the
JsonType.
parent 6f43e269
......@@ -57,6 +57,6 @@ class JsonArrayType extends JsonType
*/
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
return ! $platform->hasNativeJsonType();
return true;
}
}
......@@ -90,12 +90,7 @@ class JsonType extends Type
*/
public function requiresSQLCommentHint(AbstractPlatform $platform)
{
/*
* should be switched back to the platform detection at 3.0, when
* JsonArrayType will be dropped
*/
//return ! $platform->hasNativeJsonType();
return true;
return ! $platform->hasNativeJsonType();
}
/**
......
......@@ -383,7 +383,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
/** @var Schema\Column[] $columns */
$columns = $this->_sm->listTableColumns('test_jsonb');
self::assertSame(TYPE::JSON, $columns['foo']->getType()->getName());
self::assertSame($type, $columns['foo']->getType()->getName());
self::assertTrue(true, $columns['foo']->getPlatformOption('jsonb'));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment