Skip to content

Commit

Permalink
Fix type and revert added test line
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofandel committed Aug 28, 2023
1 parent ef97bbe commit bae63f0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
7 changes: 3 additions & 4 deletions src/Schema/TableDiff.php
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
*/
Expand Down Expand Up @@ -252,7 +252,7 @@ public function getAddedColumns(): array
}

/**
* @deprecated Use {@see getChangedColumns()} instead.
* @internal Use {@see getChangedColumns()} instead.
*
* @return list<ColumnDiff>
*/
Expand Down Expand Up @@ -283,7 +283,7 @@ public function getDroppedColumns(): array
}

/**
* @deprecated Use {@see getModifiedColumns()} instead.
* @internal Use {@see getModifiedColumns()} instead.
*
* @return array<string,Column>
*/
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/Platforms/DB2PlatformTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''",
Expand Down
2 changes: 1 addition & 1 deletion tests/Platforms/SQLServerPlatformTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"]),
);

Expand Down
2 changes: 1 addition & 1 deletion tests/Schema/AbstractComparatorTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bae63f0

Please sign in to comment.