exec($query); // Quickly convert serialized NULL entries for exception column $query = "UPDATE `cronjobs_logs` SET `exception` = NULL WHERE `exception` = 'N;'"; DBManager::get()->exec($query); // Convert all remaining logs do { $converted = CronjobLog::findEachBySQL(function ($entry) { $entry->exception = unserialize($entry->exception) ?: null; $entry->store(); unset($entry); }, "exception RLIKE '^(N;|O:)' LIMIT {$LIMIT}"); } while ($converted > 0); } public function down() { // Not neccessary } }