-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
lodata doesn't work with connection db prefix config
Repeat:
- Set connection prefix in
config/database.php
///...
'connections' => [
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DB_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'prefix' => 'my_prefix_', // <--- here
'prefix_indexes' => true,
'trust_server_certificate' => env('DB_TRUST_SERVER_CERTIFICATE', 'true'),
],
],
///...-
Setup
Lodata::discoverfor your models inapp/Providers/AppServiceProvider.php -
Check the error
There is no table with name "contracts" in the schema.
at vendor/doctrine/dbal/src/Schema/Exception/TableDoesNotExist.php:16
12▕ final class TableDoesNotExist extends LogicException implements SchemaException
13▕ {
14▕ public static function new(string $tableName): self
15▕ {
➜ 16▕ return new self(sprintf('There is no table with name "%s" in the schema.', $tableName));
17▕ }
18▕ }
19▕
prefix config was ignored. Must be my_prefix_contracts instead of contracts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels