diff options
Diffstat (limited to 'install.php')
-rw-r--r-- | install.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/install.php b/install.php index 1737e7dc..29b734d1 100644 --- a/install.php +++ b/install.php @@ -373,12 +373,13 @@ if ($res['@@character_set_database'] !== 'utf8mb4' || $res['@@collation_database $args['comment'] = $c['COLUMN_COMMENT']; } $str .= ' COLLATE ' . $COLLATION; - if (Database::exec("ALTER TABLE {$c['TABLE_NAME']} MODIFY {$c['COLUMN_NAME']} $str", $args) === false) { + $query = "ALTER TABLE `{$c['TABLE_NAME']}` MODIFY `{$c['COLUMN_NAME']}` $str"; + if (Database::exec($query, $args) === false) { $charsetUpdate .= "\n+++ {$c['TABLE_NAME']}.{$c['COLUMN_NAME']} failed: " . Database::lastError(); - $charsetUpdate .= "\nALTER TABLE {$c['TABLE_NAME']} MODIFY {$c['COLUMN_NAME']} $str"; + $charsetUpdate .= "\n$query"; } } - if (empty($charsetUpdate) && Database::exec("ALTER DATABASE $db CHARACTER SET utf8mb4 COLLATE $COLLATION") === false) { + if (empty($charsetUpdate) && Database::exec("ALTER DATABASE `$db` CHARACTER SET utf8mb4 COLLATE $COLLATION") === false) { $charsetUpdate .= "\nCannot update database charset or collation: " . Database::lastError(); } } |