Skip to content

Commit

Permalink
fix backwards dbal
Browse files Browse the repository at this point in the history
  • Loading branch information
inmanturbo committed Feb 3, 2024
1 parent 66de175 commit 54877b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/MySQLDatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public function setConnection(string $connection): self

public function listTableNames(): array
{
// deprecated in Laravel 11
if (method_exists($this->database(), 'getDoctrineSchemaManager')) {
return $this->database()->getDoctrineSchemaManager()->listTableNames();
}

return $this->database()->getSchemaBuilder()->getTableListing();
}

Expand Down
5 changes: 5 additions & 0 deletions src/SQLiteDatabaseManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public function cleanupOldDatabases(int $daysOld = 1): int

public function listTableNames(): array
{
// deprecated in Laravel 11
if (method_exists($this->database(), 'getDoctrineSchemaManager')) {
return $this->database()->getDoctrineSchemaManager()->listTableNames();
}

return $this->database()->getSchemaBuilder()->getTableListing();
}

Expand Down

0 comments on commit 54877b5

Please sign in to comment.