Skip to content

Commit

Permalink
fix pgsql/mssql/oracle missing quote
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jul 11, 2022
1 parent a277d56 commit a1c2beb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/Schema/MigratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Doctrine\DBAL\Platforms\OraclePlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SQLServerPlatform;
use Doctrine\DBAL\Schema\Identifier as DbalIdentifier;

class MigratorTest extends TestCase
{
Expand All @@ -35,7 +36,14 @@ protected function createDemoMigrator(string $table): Migrator

protected function isTableExist(string $table): bool
{
return $this->createSchemaManager()->tablesExist([$table]);
foreach ($this->createSchemaManager()->listTableNames() as $v) {
$vUnquoted = (new DbalIdentifier($v))->getName();
if ($vUnquoted === $table) {
return true;
}
}

return false;
}

public function testCreate(): void
Expand Down

0 comments on commit a1c2beb

Please sign in to comment.