Skip to content

Commit 3ca70ed

Browse files
authored
[TASK] truncate() cascade with non-mysql platforms (#684)
When truncating tables with foreign key constraints, postgres may deny truncation. Hand over an argument to doctrine to force table truncation by cascading into other tables if needed.
1 parent a7d337f commit 3ca70ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Classes/Core/Testbase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ private function truncateAllTablesForOtherDatabases(): void
869869

870870
$schemaManager = $connection->createSchemaManager();
871871
foreach ($schemaManager->listTables() as $table) {
872-
$connection->truncate($table->getName());
872+
$connection->truncate($table->getName(), true);
873873
self::resetTableSequences($connection, $table->getName());
874874
}
875875
}

0 commit comments

Comments
 (0)