File "MySQL57Platform.php"
Full Path: /home/warrior1/public_html/plugins/mailpoet/vendor-prefixed/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php
File size: 1.03 KB
MIME-type: text/x-php
Charset: utf-8
<?php
namespace MailPoetVendor\Doctrine\DBAL\Platforms;
if (!defined('ABSPATH')) exit;
use MailPoetVendor\Doctrine\DBAL\Schema\Index;
use MailPoetVendor\Doctrine\DBAL\Schema\TableDiff;
use MailPoetVendor\Doctrine\DBAL\Types\Types;
class MySQL57Platform extends MySqlPlatform
{
public function hasNativeJsonType()
{
return \true;
}
public function getJsonTypeDeclarationSQL(array $column)
{
return 'JSON';
}
protected function getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff)
{
return [];
}
protected function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff)
{
return [];
}
protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
{
return ['ALTER TABLE ' . $tableName . ' RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this)];
}
protected function getReservedKeywordsClass()
{
return Keywords\MySQL57Keywords::class;
}
protected function initializeDoctrineTypeMappings()
{
parent::initializeDoctrineTypeMappings();
$this->doctrineTypeMapping['json'] = Types::JSON;
}
}