From eaadb9fc30855918b89b94e1cf65e3e26c77dcd8 Mon Sep 17 00:00:00 2001 From: Tomo Tsuyuki Date: Tue, 11 Jun 2024 10:20:17 +1000 Subject: [PATCH] Issue #121 Increase chunk from 100 to 1000. --- db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/upgrade.php b/db/upgrade.php index 3823cc1..b56cb62 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -360,7 +360,7 @@ function xmldb_cms_upgrade($oldversion) { WHERE mcc.component = 'mod_cms' AND mcd.valuetrust = 0"; $records = $DB->get_records_sql($sql); $mcdids = array_keys($records); - foreach (array_chunk($mcdids, 100) as $ids) { + foreach (array_chunk($mcdids, 1000) as $ids) { [$sql, $params] = $DB->get_in_or_equal($ids); $sql = 'UPDATE {customfield_data} SET valuetrust = 1 WHERE id ' . $sql; $DB->execute($sql, $params);