mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°1001 switch DB charset from utf8 to utf8mb4 to allow characters outside of the BMP
* use centralized constants instead of literal values in code * remove config parameters 'db_character_set' and 'db_collation' * always fix charset when creating/altering column * backup : use utf8mb4 only for mysqldump >= 5.5.33 (was introduced in 5.5.3 but only available in 5.5.33 for programs) SVN:trunk[5443]
This commit is contained in:
@@ -787,7 +787,9 @@ EOF
|
||||
$aFieldDefs[] = "INDEX (primary_key)";
|
||||
$sFieldDefs = implode(', ', $aFieldDefs);
|
||||
|
||||
$sCreateTable = "CREATE TABLE `$sTable` ($sFieldDefs) ENGINE = ".MYSQL_ENGINE." CHARACTER SET utf8 COLLATE utf8_unicode_ci;";
|
||||
$sDbCharset = DEFAULT_CHARACTER_SET;
|
||||
$sDbCollation = DEFAULT_COLLATION;
|
||||
$sCreateTable = "CREATE TABLE `$sTable` ($sFieldDefs) ENGINE = ".MYSQL_ENGINE." CHARACTER SET ".$sDbCharset." COLLATE ".$sDbCollation.";";
|
||||
CMDBSource::Query($sCreateTable);
|
||||
|
||||
$aTriggers = $this->GetTriggersDefinition();
|
||||
|
||||
Reference in New Issue
Block a user