Skip to content

Commit

Permalink
Merge pull request #4811 from morozov/schema-get-table-names
Browse files Browse the repository at this point in the history
Fix Schema::getTableNames()
  • Loading branch information
morozov authored Sep 27, 2021
2 parents 3ee2622 + 3aa0227 commit 33c2118
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Schema/SqliteSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,4 +568,13 @@ public function listTableDetails($name): Table

return $table;
}

/**
* {@inheritDoc}
*/
public function getSchemaSearchPaths()
{
// SQLite does not support schemas or databases
return [];
}
}
17 changes: 17 additions & 0 deletions tests/Functional/Schema/SchemaTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

declare(strict_types=1);

namespace Doctrine\DBAL\Tests\Functional\Schema;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Tests\FunctionalTestCase;

class SchemaTest extends FunctionalTestCase
{
public function testSchemaName(): void
{
$schema = new Schema([], [], $this->connection->createSchemaManager()->createSchemaConfig());
self::assertNotEmpty($schema->getName());
}
}

0 comments on commit 33c2118

Please sign in to comment.