fix:修复升级导致获取表失败
This commit is contained in:
@@ -12,9 +12,11 @@ class Schemas implements OptionInterface
|
|||||||
{
|
{
|
||||||
$options = [];
|
$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);
|
$tableName = Str::of($table['name'])->remove($tablePrefix);
|
||||||
|
|
||||||
$options[] = [
|
$options[] = [
|
||||||
|
Reference in New Issue
Block a user