Convert "truncate" to delete from because it fails when there are foreign keys

This commit is contained in:
Romain Neutron
2012-03-07 16:00:41 +01:00
parent 948e6a3fc1
commit 63a880d333

View File

@@ -59,7 +59,7 @@ class patch_360 implements patchInterface
foreach ($tables as $table) foreach ($tables as $table)
{ {
$sql = 'TRUNCATE ' . $table; $sql = 'DELETE FROM ' . $table;
$stmt = $appbox->get_connection()->prepare($sql); $stmt = $appbox->get_connection()->prepare($sql);
$stmt->execute(); $stmt->execute();
$stmt->closeCursor(); $stmt->closeCursor();