Skip to content

Commit ecb2e43

Browse files
authored
Merge pull request #7167 from morozov/abstract-get-rename-index-sql
Declare AbstractPlatform::getRenameIndexSQL() as abstract
2 parents c87d1d6 + c91009c commit ecb2e43

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/Platforms/AbstractPlatform.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,13 +1272,7 @@ protected function getPostAlterTableIndexForeignKeySQL(TableDiff $diff): array
12721272
*
12731273
* @return list<string> The sequence of SQL statements for renaming the given index.
12741274
*/
1275-
protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array
1276-
{
1277-
return [
1278-
$this->getDropIndexSQL($oldIndexName, $tableName),
1279-
$this->getCreateIndexSQL($index, $tableName),
1280-
];
1281-
}
1275+
abstract protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array;
12821276

12831277
/**
12841278
* Returns the SQL for renaming a column

src/Platforms/SQLitePlatform.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,15 @@ public function getCreateIndexSQL(Index $index, string $table): string
571571
return implode(' ', $chunks);
572572
}
573573

574+
/** {@inheritDoc} */
575+
protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName): array
576+
{
577+
return [
578+
$this->getDropIndexSQL($oldIndexName, $tableName),
579+
$this->getCreateIndexSQL($index, $tableName),
580+
];
581+
}
582+
574583
/**
575584
* {@inheritDoc}
576585
*/

0 commit comments

Comments
 (0)