Disable native JSON support for MariaDB 10.2.x

Since the JSON type is simply an alias to a LONG TEXT we must force
a comment, otherwise things will not work properly.

Also the test for JSON types should work regardless of native JSON
support (DBAL should add a comment to identify the correct type).
parent 6fa85496
......@@ -36,7 +36,7 @@ final class MariaDb1027Platform extends MySqlPlatform
*/
public function hasNativeJsonType() : bool
{
return true;
return false;
}
/**
......
......@@ -12,12 +12,11 @@ use Doctrine\Tests\Types\MySqlPointType;
class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
{
protected function setUp()
{
parent::setUp();
if (!Type::hasType('point')) {
if ( ! Type::hasType('point')) {
Type::addType('point', MySqlPointType::class);
}
}
......@@ -337,11 +336,6 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public function testJsonColumnType() : void
{
$platform = $this->_sm->getDatabasePlatform();
if ( ! $platform->hasNativeJsonType()) {
$this->markTestSkipped("Requires native JSON type");
}
$table = new Table('test_mysql_json');
$table->addColumn('col_json', 'json');
$this->_sm->dropAndCreateTable($table);
......
......@@ -19,7 +19,7 @@ class MariaDb1027PlatformTest extends AbstractMySQLPlatformTestCase
public function testHasNativeJsonType() : void
{
self::assertTrue($this->_platform->hasNativeJsonType());
self::assertFalse($this->_platform->hasNativeJsonType());
}
/**
......
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