From 28b6a930f148bb138b3473cfa0e37c096e6c3ed3 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 5 Jan 2024 11:06:55 +0800 Subject: [PATCH] * Not change engine for consistency. --- module/upgrade/model.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 1f33364755..8c15a5b6a7 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -339,9 +339,6 @@ class upgradeModel extends model $createHead = array_shift($lines); $createFoot = array_pop($lines); - preg_match_all('/ENGINE=(\w+) /', $createFoot, $out); - $stdEngine = isset($out[1][0]) ? $out[1][0] : 'InnoDB'; - preg_match_all('/CREATE TABLE `([^`]*)`/', $createHead, $out); if(!isset($out[1][0])) return $changes; @@ -355,9 +352,6 @@ class upgradeModel extends model $dbSQLHead = array_shift($dbSQLLines); $dbSQLFoot = array_pop($dbSQLLines); - preg_match_all('/ENGINE=(\w+) /', $dbSQLFoot, $out); - $dbEngine = isset($out[1][0]) ? $out[1][0] : 'InnoDB'; - foreach($dbSQLLines as $dbSQLLine) { $dbSQLLine = trim($dbSQLLine); @@ -381,7 +375,6 @@ class upgradeModel extends model } $changes = array(); - if($stdEngine != $dbEngine) $changes[] = "ALTER TABLE `{$table}` ENGINE='{$stdEngine}'"; foreach($lines as $line) { $change = $this->checkFieldConsistency($table, $line, $fields);