diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-30 05:44:26 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-30 05:44:26 +0400 |
commit | 3802b2362c03ef288f28a27b0fc9c2e8e2faa3e3 (patch) | |
tree | bb0b788560e2787586ee90b9b5cdb76d735a3b60 /core/Columns | |
parent | 8e58b758fb03d8d38db6a6c78f824cb68ee68668 (diff) |
there is not a need to alter the table in chunks as this did not cause the mysql has gone away error
Diffstat (limited to 'core/Columns')
-rw-r--r-- | core/Columns/Updates.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Columns/Updates.php b/core/Columns/Updates.php index 16233c78ff..0660c35d6f 100644 --- a/core/Columns/Updates.php +++ b/core/Columns/Updates.php @@ -42,11 +42,11 @@ class Updates extends \Piwik\Updates $changingColumns = self::getUpdates(); foreach ($changingColumns as $table => $columns) { - $chunks = array_chunk($columns, 3); - - foreach ($chunks as $columnsToAlter) { - $sqls["ALTER TABLE `" . Common::prefixTable($table) . "` " . implode(', ', $columnsToAlter)] = false; + if (empty($columns) || !is_array($columns)) { + continue; } + + $sqls["ALTER TABLE `" . Common::prefixTable($table) . "` " . implode(', ', $columns)] = false; } return $sqls; |