'1234', // if the query fails, it will be ignored if the error code is 1234 * 'ALTER .... ' => false, // if an error occurs, the update will stop and fail * // and user will have to manually run the query * ) * ``` */ public function getMigrationQueries(Updater $updater) { $errorCodesToIgnore = array(1060); $tableName = Common::prefixTable('log_visit'); $updateSql = "ALTER TABLE `" . $tableName . "` CHANGE `example` `example` BOOLEAN NOT NULL"; return array( // $updateSql => $errorCodesToIgnore ); } /** * Perform the incremental version update. * * This method should preform all updating logic. If you define queries in an overridden `getMigrationQueries()` * method, you must call {@link Updater::executeMigrationQueries()} here. * * See {@link Updates} for an example. * * @param Updater $updater */ public function doUpdate(Updater $updater) { $updater->executeMigrationQueries(__FILE__, $this->getMigrationQueries($updater)); } }