diff --git a/src/Platforms/AbstractMySQLPlatform.php b/src/Platforms/AbstractMySQLPlatform.php index 06f58813c03..d3f411a83d6 100644 --- a/src/Platforms/AbstractMySQLPlatform.php +++ b/src/Platforms/AbstractMySQLPlatform.php @@ -119,6 +119,14 @@ public function getListViewsSQL(string $database): string return 'SELECT * FROM information_schema.VIEWS WHERE TABLE_SCHEMA = ' . $this->quoteStringLiteral($database); } + /** + * {@inheritDoc} + */ + public function getJsonTypeDeclarationSQL(array $column): string + { + return 'JSON'; + } + /** * Gets the SQL snippet used to declare a CLOB column type. * TINYTEXT : 2 ^ 8 - 1 = 255 diff --git a/src/Platforms/MariaDBPlatform.php b/src/Platforms/MariaDBPlatform.php index 570d0e360db..3388e395b16 100644 --- a/src/Platforms/MariaDBPlatform.php +++ b/src/Platforms/MariaDBPlatform.php @@ -20,19 +20,6 @@ */ class MariaDBPlatform extends AbstractMySQLPlatform { - /** - * Use JSON rather than LONGTEXT for json columns. Since it is not a true native type, do not override - * hasNativeJsonType() so the DC2Type comment will still be set. - * - * @link https://mariadb.com/kb/en/library/json-data-type/ - * - * {@inheritDoc} - */ - public function getJsonTypeDeclarationSQL(array $column): string - { - return 'JSON'; - } - /** * Generate SQL snippets to reverse the aliasing of JSON to LONGTEXT. * @@ -46,10 +33,6 @@ public function getJsonTypeDeclarationSQL(array $column): string */ public function getColumnTypeSQLSnippets(string $tableAlias = 'c'): array { - if ($this->getJsonTypeDeclarationSQL([]) !== 'JSON') { - return parent::getColumnTypeSQLSnippets($tableAlias); - } - $columnTypeSQL = <<