I'm using PostgreSQL with Laravel. I have created a new Schema in my postgresql Database and setup pgsql driver in my laravel project. But when I migrate all migration by-default load in publicSchema. I want to load all migration in self-defined Schema. How Can I do this.
Here, my .env and app/config/database file configuration.
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:qqv8sHot0EBDj4fZXedwaxY4Xb+O4ynEzLgyKTLtW88=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=dbtuto
DB_USERNAME=postgres
DB_PASSWORD=root
app/config/database file configuration.
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', ''),
'username' => env('DB_USERNAME', ''),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'dbtutoschema',
'sslmode' => 'prefer',
],
Note:dbtutoschema is my self-defined schema I want to load all migration under this Schema.