From 0a1e76f365dbd90eee9c72d81d898e1a0ddf630c Mon Sep 17 00:00:00 2001 From: hashworks Date: Mon, 10 Jul 2017 21:41:59 +0200 Subject: Fix chunk update for filesizes This includes the where limitation of the update query in the total limit of the chunk for loop. --- application/migrations/019_change_filesize_type.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/migrations/019_change_filesize_type.php b/application/migrations/019_change_filesize_type.php index 47a998452..33abf89ed 100644 --- a/application/migrations/019_change_filesize_type.php +++ b/application/migrations/019_change_filesize_type.php @@ -21,7 +21,8 @@ class Migration_change_filesize_type extends CI_Migration { $chunk = 500; - $total = $this->db->count_all("file_storage"); + $this->db->where('filesize', 2147483647); + $total = $this->db->count_all_results("file_storage"); for ($limit = 0; $limit < $total; $limit += $chunk) { $query = $this->db->select('hash, id') -- cgit v1.2.3-24-g4f1b