diff --git a/src/Schema/TableDiff.php b/src/Schema/TableDiff.php index 23502340055..c89f54b7431 100644 --- a/src/Schema/TableDiff.php +++ b/src/Schema/TableDiff.php @@ -58,7 +58,7 @@ class TableDiff /** * Columns that are only renamed from key to column instance name. * - * @deprecated Use {@see getChangedColumns()} instead. + * @internal Use {@see getChangedColumns()} instead. Will be removed in dbal 4. * * @var Column[] */ @@ -252,7 +252,7 @@ public function getAddedColumns(): array } /** - * @deprecated Use {@see getChangedColumns()} instead. + * @internal Use {@see getChangedColumns()} instead. * * @return list */ @@ -283,7 +283,7 @@ public function getDroppedColumns(): array } /** - * @deprecated Use {@see getModifiedColumns()} instead. + * @internal Use {@see getModifiedColumns()} instead. * * @return array */ @@ -401,7 +401,6 @@ public function isEmpty(): bool return count($this->addedColumns) === 0 && count($this->changedColumns) === 0 && count($this->removedColumns) === 0 - && count($this->renamedColumns) === 0 && count($this->addedIndexes) === 0 && count($this->changedIndexes) === 0 && count($this->removedIndexes) === 0 diff --git a/tests/Platforms/DB2PlatformTest.php b/tests/Platforms/DB2PlatformTest.php index 09239f23fe8..377958963c0 100644 --- a/tests/Platforms/DB2PlatformTest.php +++ b/tests/Platforms/DB2PlatformTest.php @@ -128,7 +128,8 @@ public function getAlterTableColumnCommentsSQL(): array { return [ 'ALTER TABLE mytable ' . - 'ADD COLUMN quota INTEGER NOT NULL WITH DEFAULT RENAME COLUMN bar TO baz', + 'ADD COLUMN quota INTEGER NOT NULL WITH DEFAULT ' . + 'RENAME COLUMN bar TO baz', "CALL SYSPROC.ADMIN_CMD ('REORG TABLE mytable')", "COMMENT ON COLUMN mytable.quota IS 'A comment'", "COMMENT ON COLUMN mytable.foo IS ''", diff --git a/tests/Platforms/SQLServerPlatformTest.php b/tests/Platforms/SQLServerPlatformTest.php index d4812718cd4..230b6d55e64 100644 --- a/tests/Platforms/SQLServerPlatformTest.php +++ b/tests/Platforms/SQLServerPlatformTest.php @@ -993,7 +993,7 @@ public function testGeneratesAlterTableSQLWithColumnComments(): void $tableDiff->changedColumns['comment_with_string_literal_char'] = new ColumnDiff( 'comment_with_string_literal_char', new Column('comment_with_string_literal_char', Type::getType(Types::STRING), ['comment' => "'"]), - ['comment'], + ['comment', 'type'], new Column('comment_with_string_literal_char', Type::getType(Types::ARRAY), ['comment' => "O'Reilly"]), ); diff --git a/tests/Schema/AbstractComparatorTestCase.php b/tests/Schema/AbstractComparatorTestCase.php index 08ca5e4aec0..569b28a5419 100644 --- a/tests/Schema/AbstractComparatorTestCase.php +++ b/tests/Schema/AbstractComparatorTestCase.php @@ -742,7 +742,7 @@ public function testDetectRenameColumnAmbiguous(): void self::assertCount(2, $tableDiff->removedColumns); self::assertArrayHasKey('foo', $tableDiff->removedColumns); self::assertArrayHasKey('bar', $tableDiff->removedColumns); - self::assertCount(0, $tableDiff->renamedColumns); + self::assertCount(0, $tableDiff->getRenamedColumns()); } public function testDetectRenameIndex(): void