db:wipe
doesn't remove partitioned tables on PostgreSQL
#49321
Labels
db:wipe
doesn't remove partitioned tables on PostgreSQL
#49321
Laravel Version
10.35.0
PHP Version
8.2.13
Database Driver & Version
PostgreSQL 15.5 for Ubuntu on amd64
Description
db:wipe
only drops regular tables, partitioned tables are not dropped in PostgreSQL. I've noticed this while runningmigrate:fresh
command (fromRefreshDatabase
trait in tests). If some migration is creating a partitioned table without checking if it exists, running tests passes the first time but fails on every following run because the table already exists. Even if table is created withIF NOT EXISTS
migrations changing it will have the same problem.Expected behavior would be for the partitioned tables to be removed as well.
It started happening from version 10.34.0 (#49020).
Steps To Reproduce
vendor/bin/sail up -d
vendor/bin/sail composer install
vendor/bin/sail test
- they pass the first time.Duplicate table: 7 ERROR: relation "groups" already exists
The text was updated successfully, but these errors were encountered: