Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cristi-contiu committed Feb 27, 2025
1 parent 41cb96c commit fadaf5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Generator/DiffGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ private function createToSchema(): Schema
*/
private function resolveTableName(string $name): string
{
if ($this->platform->supportsSchemas()) {
return $name;
}

$pos = strpos($name, '.');

return $pos === false ? $name : substr($name, $pos + 1);
Expand Down
4 changes: 4 additions & 0 deletions tests/Generator/DiffGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ public function testGenerateCallsComparatorWithExpectedSchemasWhenDbalHasSchemaA
$toTable2 = new Table('some_schema.table2');
$toSchema = new Schema([$toTable1, $toTable2]);

$this->platform->expects(self::exactly(3))
->method('supportsSchemas')
->willReturn(true);

$this->schemaManager->expects(self::once())
->method('introspectSchema')
->willReturn($fromSchema);
Expand Down

0 comments on commit fadaf5a

Please sign in to comment.