MySQL80Platform extends MySQL80Platform uses MySQLCompatibleAlterTablePlatformAwareTrait, MySQLDefaultValueDeclarationSQLOverrideTrait
doctrine/dbal 4+ removed the old doctrine event system. The new way is to extend the platform class(es) and directly override the methods instead of consuming events. Therefore, we need to extend the platform classes to provide some changes for TYPO3 database schema operations.
not part of Public Core API.
Table of Contents
Methods
- getAlterTableSQL() : array<int, string>
- Gets the SQL statements for altering an existing table.
- getDefaultValueDeclarationSQL() : string
- Obtains DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE.
- getCustomAlterTableSQLEngineOptions() : array<int, string>
Methods
getAlterTableSQL()
Gets the SQL statements for altering an existing table.
public
getAlterTableSQL(TableDiff|TableDiff $diff) : array<int, string>
This method returns an array of SQL statements, since some platforms need several statements.
Parameters
- $diff : TableDiff|TableDiff
Return values
array<int, string>getDefaultValueDeclarationSQL()
Obtains DBMS specific SQL code portion needed to set a default value declaration to be used in statements like CREATE TABLE.
public
getDefaultValueDeclarationSQL(array<string|int, mixed> $column) : string
Oracle MySQL does not support default values on TEXT/BLOB columns until 8.0.13. Doctrine DBAL 4.x supports earlier version of MySQL and decided to unset the column default value for TextType and BlobType generally in the MySQL platform variants. This trait reintroduces the AbstractPlatform implementation to be used in the TYPO3 platform overrides for MySQL to remove this limitation and allow the use of default value as expressions.
Parameters
- $column : array<string|int, mixed>
-
The column definition array.
Tags
Return values
string —DBMS specific SQL code portion needed to set a default value.
getCustomAlterTableSQLEngineOptions()
protected
getCustomAlterTableSQLEngineOptions(MariaDBPlatform|MySQLPlatform $platform, TableDiff|TableDiff $tableDiff, array<int, string> $result) : array<int, string>
Parameters
- $platform : MariaDBPlatform|MySQLPlatform
- $tableDiff : TableDiff|TableDiff
- $result : array<int, string>