I run php artisan migrate
the first time, and it work perfectly fine.
I've added 1 more migration script to alter one of my table.
As soon as I ran php artisan migrate
, I started to see this error.
I have this setting in my database.php
'default' => env('DB_CONNECTION', 'pgsql'),
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST'),
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
Please kindly let me know what else, I can provide.
The actual solution is to append 'schema' => 'public',
to the end of the psql DB_CONNECTION.
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST'),
'database' => env('DB_DATABASE'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'schema' => 'public', <------- ADD HERE
],
Now, php artisan migrate
works perfectly fine.