Skip to content

Commit

Permalink
Add a test for quoting table names in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Aug 13, 2022
1 parent c552c3e commit 641264e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/Functional/Schema/OracleSchemaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,27 @@ public function testCreateAndListSequences(): void
"Skipped for uppercase letters are contained in sequences' names. Fix the schema manager in 3.0."
);
}

public function testQuotedTableNameRemainsQuotedInSchema(): void
{
$table = new Table('"tester"');
$table->addColumn('"id"', Types::INTEGER);
$table->addColumn('"name"', Types::STRING);

$this->dropAndCreateTable($table);

$schemaManager = $this->connection->createSchemaManager();

$fromSchema = $schemaManager->createSchema();
$toSchema = clone $fromSchema;

$toSchema->getTable('"tester"')->dropColumn('"name"');
$diff = $schemaManager->createComparator()
->compareSchemas($fromSchema, $toSchema);

$schemaManager->alterSchema($diff);

$columns = $schemaManager->listTableColumns('"tester"');
self::assertCount(1, $columns);
}
}

0 comments on commit 641264e

Please sign in to comment.