MariaDB1052Platform extends MariaDB1052Platform uses GetColumnDeclarationSQLCommentTypeAwareTrait, MySQLCompatibleAlterTablePlatformAwareTrait

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.

Internal

not part of Public Core API.

Table of Contents

Methods

getAlterTableSQL()  : array<int, string>
Gets the SQL statements for altering an existing table.
getColumnDeclarationSQL()  : string
Note that this provides a method override to combine type based comments with the column comment on platforms.
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>

getColumnDeclarationSQL()

Note that this provides a method override to combine type based comments with the column comment on platforms.

public getColumnDeclarationSQL(string $name, array<string|int, mixed> $column) : string

Obtains DBMS specific SQL code portion needed to declare a generic type column to be used in statements like CREATE TABLE.

Parameters
$name : string

The name the column to be declared.

$column : array<string|int, mixed>

An associative array with the name of the properties of the column being declared as array indexes. Currently, the types of supported column properties are as follows:

length Integer value that determines the maximum length of the text column. If this argument is missing the column should be declared to have the longest length allowed by the DBMS. default Text value to be used as default for this column. notnull Boolean flag that indicates whether this column is constrained to not be set to null. charset Text value with the default CHARACTER SET for this column. collation Text value with the default COLLATION for this column. columnDefinition a string that defines the complete column

Internal

The method should be only used from within the AbstractPlatform class hierarchy.

Return values
string

DBMS specific SQL code portion that should be used to declare the column.

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>
Return values
array<int, string>

        
On this page

Search results