feat: implement MySqlDriver for dynamic database connection and schema discovery

This commit is contained in:
Ümit Tunç
2026-04-24 08:18:03 +03:00
parent 48e608a736
commit c433630e33
@@ -23,7 +23,7 @@ class MySqlDriver implements DatabaseDriverInterface, SchemaDiscoveryInterface
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => true, 'strict' => false,
'engine' => null, 'engine' => null,
]); ]);
@@ -89,7 +89,7 @@ class MySqlDriver implements DatabaseDriverInterface, SchemaDiscoveryInterface
REFERENCED_TABLE_NAME IS NOT NULL AND REFERENCED_TABLE_NAME IS NOT NULL AND
TABLE_SCHEMA = ? TABLE_SCHEMA = ?
"; ";
$dbName = DB::connection($this->connectionName)->getDatabaseName(); $dbName = DB::connection($this->connectionName)->getDatabaseName();
return $this->query($sql, [$table, $dbName]); return $this->query($sql, [$table, $dbName]);
} }