Level 75
3306 is MySql, replace with correct credentials.
Hi, community.
how can i setting a sql server schema ?
I have in my .env
DB_CONNECTION=sqlsrv
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=root
But I want to point to a development scheme. I read that I have to specify the schema in the database sources so, I added this line in the database settings
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
// this line
'schema' => 'develop'
],
however, the tables cannot migrate to the specific schema. So get migration by migration to run on the specified scheme, now my problem is that passport does not work. Since if I configure migrations to the new schema, the models stop working by not pointing to the new schema.
What can I do in this case?
Please or to participate in this conversation.