Force comments on the JsonArrayType

And then we don't need to wait till v3 to not require comments on the
JsonType.
parent 78c12e2d
...@@ -57,6 +57,6 @@ class JsonArrayType extends JsonType ...@@ -57,6 +57,6 @@ class JsonArrayType extends JsonType
*/ */
public function requiresSQLCommentHint(AbstractPlatform $platform) public function requiresSQLCommentHint(AbstractPlatform $platform)
{ {
return ! $platform->hasNativeJsonType(); return true;
} }
} }
...@@ -90,12 +90,7 @@ class JsonType extends Type ...@@ -90,12 +90,7 @@ class JsonType extends Type
*/ */
public function requiresSQLCommentHint(AbstractPlatform $platform) public function requiresSQLCommentHint(AbstractPlatform $platform)
{ {
/* return ! $platform->hasNativeJsonType();
* should be switched back to the platform detection at 3.0, when
* JsonArrayType will be dropped
*/
//return ! $platform->hasNativeJsonType();
return true;
} }
/** /**
......
...@@ -383,7 +383,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase ...@@ -383,7 +383,7 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
/** @var Schema\Column[] $columns */ /** @var Schema\Column[] $columns */
$columns = $this->_sm->listTableColumns('test_jsonb'); $columns = $this->_sm->listTableColumns('test_jsonb');
$this->assertSame(TYPE::JSON, $columns['foo']->getType()->getName()); $this->assertSame($type, $columns['foo']->getType()->getName());
$this->assertTrue(true, $columns['foo']->getPlatformOption('jsonb')); $this->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