Skip to content

Commit 932e9b8

Browse files
committed
Merge branch '4.3.x' into 5.0.x
2 parents d990316 + 3b6decb commit 932e9b8

File tree

12 files changed

+163
-131
lines changed

12 files changed

+163
-131
lines changed

UPGRADE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ all drivers and middleware.
187187

188188
# Upgrade to 4.3
189189

190+
## Deprecated not passing `$options` to `AbstractPlatform::_getCreateTableSQL()`
191+
192+
Not passing the `$options` argument or any of its following keys to the `AbstractPlatform::_getCreateTableSQL()` method
193+
has been deprecated: `primary`, `indexes`, `uniqueConstraints`, `foreignKeys`.
194+
195+
## Deprecated check-related features
196+
197+
1. The `AbstractPlatform::getCheckDeclarationSQL()` method has been marked as internal.
198+
2. Passing string elements as part of the `$definition` argument to `AbstractPlatform::getCheckDeclarationSQL()` is
199+
deprecated. Pass column definitions represented as array instead.
200+
190201
## Deprecated `Index` usage scenarios
191202

192203
The following `Index` usage scenarios have been deprecated:

src/Platforms/AbstractMySQLPlatform.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ public function getColumnTypeSQLSnippet(string $tableAlias, string $databaseName
229229
*/
230230
protected function _getCreateTableSQL(string $name, array $columns, array $options = []): array
231231
{
232+
$this->validateCreateTableOptions($options, __METHOD__);
233+
232234
$queryFields = $this->getColumnDeclarationListSQL($columns);
233235

234236
if (! empty($options['uniqueConstraints'])) {
@@ -668,12 +670,13 @@ private function getUnsignedDeclaration(array $columnDef): string
668670
*/
669671
protected function _getCommonIntegerTypeDeclarationSQL(array $column): string
670672
{
671-
$autoinc = '';
673+
$sql = $this->getUnsignedDeclaration($column);
674+
672675
if (! empty($column['autoincrement'])) {
673-
$autoinc = ' AUTO_INCREMENT';
676+
$sql .= ' AUTO_INCREMENT';
674677
}
675678

676-
return $this->getUnsignedDeclaration($column) . $autoinc;
679+
return $sql;
677680
}
678681

679682
protected function getColumnCharsetDeclarationSQL(string $charset): string

0 commit comments

Comments
 (0)