mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +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)
|
||||
{
|
||||
$sql = 'TRUNCATE ' . $table;
|
||||
$sql = 'DELETE FROM ' . $table;
|
||||
$stmt = $appbox->get_connection()->prepare($sql);
|
||||
$stmt->execute();
|
||||
$stmt->closeCursor();
|
||||
|
Reference in New Issue
Block a user