From e343550246430bb225f7cd510f90093b6d63eb9c Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Wed, 22 Sep 2021 12:43:27 -0700 Subject: [PATCH] Fix Schema::getTableNames() Co-authored-by: Asmir Mustafic --- src/Schema/SqliteSchemaManager.php | 9 +++++++++ tests/Functional/Schema/SchemaTest.php | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tests/Functional/Schema/SchemaTest.php diff --git a/src/Schema/SqliteSchemaManager.php b/src/Schema/SqliteSchemaManager.php index 6d678247db2..140ebb3c0de 100644 --- a/src/Schema/SqliteSchemaManager.php +++ b/src/Schema/SqliteSchemaManager.php @@ -568,4 +568,13 @@ public function listTableDetails($name): Table return $table; } + + /** + * {@inheritDoc} + */ + public function getSchemaSearchPaths() + { + // SQLite does not support schemas or databases + return []; + } } diff --git a/tests/Functional/Schema/SchemaTest.php b/tests/Functional/Schema/SchemaTest.php new file mode 100644 index 00000000000..6cd36479ad1 --- /dev/null +++ b/tests/Functional/Schema/SchemaTest.php @@ -0,0 +1,20 @@ +connection->createSchemaManager()->createSchemaConfig()); + $schema->createTable('foo'); + + $tableNames = $schema->getTableNames(); + self::assertEquals(['public.foo'], $tableNames); + } +}