* Revert code 12d6a65fcf.
This commit is contained in:
@@ -459,6 +459,13 @@ class dbh
|
||||
$sql = preg_replace('/\,\s*(unique|fulltext)*\s+key[\_\"0-9a-z ]+\(+[\,\_\"0-9a-z ]+\)+/i', '', $sql);
|
||||
$sql = preg_replace('/ float\s*\(+[\,\_\"0-9a-z ]+\)+/i', ' float', $sql);
|
||||
|
||||
/* Convert "date" datetime to "date" datetime(0) to fix bug 25725, dm database datetime default 6 */
|
||||
preg_match_all('/"[0-9a-zA-Z]+" datetime/', $sql, $datetimeMatch);
|
||||
if(!empty($datetimeMatch))
|
||||
{
|
||||
foreach($datetimeMatch[0] as $match) $sql = str_replace($match, $match . '(0)', $sql);
|
||||
}
|
||||
|
||||
if(strpos($sql, "ALTER TABLE") !== false) $sql = $this->convertAlterTableSql($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -423,16 +423,6 @@ class installModel extends model
|
||||
$table = str_replace('`ztv_', $this->config->db->name . '.`ztv_', $table);
|
||||
$table = str_replace('zt_', $this->config->db->prefix, $table);
|
||||
|
||||
if($this->config->db->driver != 'mysql')
|
||||
{
|
||||
/* Convert "date" datetime to "date" datetime(0) to fix bug 25725, dm database datetime default 6 */
|
||||
preg_match_all('/"[0-9a-zA-Z]+" datetime/', $table, $datetimeMatch);
|
||||
if(!empty($datetimeMatch))
|
||||
{
|
||||
foreach($datetimeMatch[0] as $match) $table = str_replace($match, $match . '(0)', $table);
|
||||
}
|
||||
}
|
||||
|
||||
$this->dbh->exec($table);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user