Closed
Description
PHP Version
8.3
Swoole Extension Version
6
Database Driver & Version
Postgres
Description
php artisan migrate:fresh
doesn't drop tables when using Postgres:
When I check the db after running migrate:fresh
the existing data is still there
Steps To Reproduce
-
Install hyperf/database-pgsql
-
Use the following config for the pgsql connection:
'pgsql' => [
'driver' => env('DB_DRIVER', 'pgsql'),
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'hypervel'),
'port' => env('DB_PORT', 5432),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => env('DB_CHARSET', 'utf8'),
'pool' => [
'min_connections' => 1,
'max_connections' => env('DB_MAX_CONNECTIONS', 10),
'connect_timeout' => 10.0,
'wait_timeout' => 3.0,
'heartbeat' => -1,
'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
],
],
- Migrate the db, add some data, then run
migrate:fresh
. The old data will still be there.
PS. migrate:fresh
works properly with Postgres in Hyperf
Metadata
Metadata
Assignees
Labels
No labels