Файл: vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySQL57Platform.php
Строк: 63
<?php
namespace DoctrineDBALPlatforms;
use DoctrineDBALSchemaIndex;
use DoctrineDBALSchemaTableDiff;
use DoctrineDBALTypesTypes;
/**
* Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform.
*/
class MySQL57Platform extends MySqlPlatform
{
/**
* {@inheritdoc}
*/
public function hasNativeJsonType()
{
return true;
}
/**
* {@inheritdoc}
*/
public function getJsonTypeDeclarationSQL(array $column)
{
return 'JSON';
}
/**
* {@inheritdoc}
*/
protected function getPreAlterTableRenameIndexForeignKeySQL(TableDiff $diff)
{
return [];
}
/**
* {@inheritdoc}
*/
protected function getPostAlterTableRenameIndexForeignKeySQL(TableDiff $diff)
{
return [];
}
/**
* {@inheritdoc}
*/
protected function getRenameIndexSQL($oldIndexName, Index $index, $tableName)
{
return ['ALTER TABLE ' . $tableName . ' RENAME INDEX ' . $oldIndexName . ' TO ' . $index->getQuotedName($this)];
}
/**
* {@inheritdoc}
*/
protected function getReservedKeywordsClass()
{
return KeywordsMySQL57Keywords::class;
}
/**
* {@inheritdoc}
*/
protected function initializeDoctrineTypeMappings()
{
parent::initializeDoctrineTypeMappings();
$this->doctrineTypeMapping['json'] = Types::JSON;
}
}