From 7525386dccf23434eb0751d8ca5f6d1a17e47f49 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Fri, 22 May 2015 11:10:19 +0200 Subject: Fix missing db prefix in migration Signed-off-by: Florian Pritz --- application/migrations/014_deduplicate_file_storage.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'application/migrations/014_deduplicate_file_storage.php') diff --git a/application/migrations/014_deduplicate_file_storage.php b/application/migrations/014_deduplicate_file_storage.php index a1ea4fab4..133fbbab7 100644 --- a/application/migrations/014_deduplicate_file_storage.php +++ b/application/migrations/014_deduplicate_file_storage.php @@ -40,18 +40,18 @@ class Migration_deduplicate_file_storage extends CI_Migration { // XXX: This query also exists in migration 15 $this->db->query(' - DELETE file_storage - FROM file_storage - LEFT OUTER JOIN files ON files.file_storage_id = file_storage.id - WHERE file_storage.id NOT IN ( + DELETE `'.$prefix.'file_storage` + FROM `'.$prefix.'file_storage` + LEFT OUTER JOIN `'.$prefix.'files` ON `'.$prefix.'files`.file_storage_id = `'.$prefix.'file_storage`.id + WHERE `'.$prefix.'file_storage`.id NOT IN ( SELECT min(x.id) FROM ( SELECT fs.id, fs.hash - FROM file_storage fs + FROM `'.$prefix.'file_storage` fs ) x GROUP BY x.hash ) - AND files.id IS NULL + AND `'.$prefix.'files`.id IS NULL '); $chunk = 500; -- cgit v1.2.3-24-g4f1b