From 8f65a2bf99ec7b02a5005ec5c0fdab83d7a27381 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Sat, 12 Apr 2025 13:29:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E8=8E=B7=E5=8F=96=E8=A1=A8=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/Common/Repository/Options/Schemas.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/Common/Repository/Options/Schemas.php b/modules/Common/Repository/Options/Schemas.php index aea70c7..8debc8b 100644 --- a/modules/Common/Repository/Options/Schemas.php +++ b/modules/Common/Repository/Options/Schemas.php @@ -12,9 +12,11 @@ class Schemas implements OptionInterface { $options = []; - $tablePrefix = DB::connection()->getTablePrefix(); + $connection = DB::connection(); + $databaseName = $connection->getDatabaseName(); + $tablePrefix = $connection->getTablePrefix(); - foreach (Schema::getTables() as $table) { + foreach (Schema::getTables($databaseName) as $table) { $tableName = Str::of($table['name'])->remove($tablePrefix); $options[] = [