Skip to content

Commit

Permalink
Issue #121 Increase chunk from 100 to 1000.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomoTsuyuki committed Nov 13, 2024
1 parent fd4880f commit 939ef51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 939ef51

Please sign in to comment.