Fixed #81, character set and collation set to utf-8 by default

SVN:trunk[293]
This commit is contained in:
Romain Quetiez
2010-01-29 18:18:18 +00:00
parent e55a11df4b
commit f8d6ef2407
2 changed files with 2 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ class CMDBSource
public static function CreateDB($sSource)
{
self::Query("CREATE DATABASE `$sSource`");
self::Query("CREATE DATABASE `$sSource` CHARACTER SET utf8 COLLATE utf8_unicode_ci");
self::SelectDB($sSource);
}

View File

@@ -2079,7 +2079,7 @@ abstract class MetaModel
if (!CMDBSource::IsTable($sTable))
{
$aErrors[$sClass][] = "table '$sTable' could not be found into the DB";
$aSugFix[$sClass][] = "CREATE TABLE `$sTable` (`$sKeyField` INT(11) NOT NULL $sAutoIncrement PRIMARY KEY) ENGINE = innodb";
$aSugFix[$sClass][] = "CREATE TABLE `$sTable` (`$sKeyField` INT(11) NOT NULL $sAutoIncrement PRIMARY KEY) ENGINE = innodb CHARACTER SET utf8 COLLATE utf8_unicode_ci";
}
// Check that the key field exists
//