5use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
6use Wikimedia\Timestamp\ConvertibleTimestamp;
18 $type = $column[
'type'];
19 $default = $column[
'default'] ??
null;
22 if ( isset( $column[
'allowInfinite'] ) &&
23 $column[
'allowInfinite'] &&
24 $default ===
'infinity'
26 $pgTimestamp = $default;
28 $timestamp =
new ConvertibleTimestamp( $default );
29 $pgTimestamp = $timestamp->getTimestamp( TS_POSTGRES );
32 return " DEFAULT '$pgTimestamp' ";
35 return parent::getDefaultValueDeclarationSQL( $column );
44 $tableSql = parent::_getCreateTableSQL( $name, $columns, $options );
45 foreach ( $columns as $column ) {
46 if ( $column[
'type'] instanceof
EnumType && $column[
'fixed'] ) {
51 $typeSql = $column[
'type']->makeEnumTypeSql( $column, $this );
52 array_unshift( $tableSql, $typeSql );
getFloatDeclarationSQL(array $column)
getDefaultValueDeclarationSQL( $column)
Handles Postgres unique timestamp format .
getDateTimeTzTypeDeclarationSQL(array $column)
getBlobTypeDeclarationSQL(array $column)
_getCreateTableSQL( $name, $columns, array $options=[])
phpcs:disable PSR2.Methods.MethodDeclaration.Underscore
getBinaryTypeDeclarationSQL(array $column)