mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Convert "truncate" to delete from because it fails when there are foreign keys
This commit is contained in:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user