CHARACTER SET utf8 COLLATE utf8_unicode-ci after creating/importing a database.
This commit is contained in:
parent
f029fdbd2e
commit
aa18b75ef8
@ -182,7 +182,7 @@ namespace TBF.UI.Settings
|
||||
|
||||
log.ErrorFormat("Going to create an empty configuration database '{0}'", databaseName);
|
||||
ExecuteMySqlCmd(string.Format("DROP DATABASE `{0}`;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}`;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}` CHARACTER SET utf8 COLLATE utf8_unicode_ci;", databaseName), userName);
|
||||
Config.FluentCommon.CreateEmptyConfigDB(bench.ProceduresDBSettings.DbType, connectionString);
|
||||
log.ErrorFormat("An empty configuration database '{0}' was created", databaseName);
|
||||
|
||||
@ -223,7 +223,7 @@ namespace TBF.UI.Settings
|
||||
|
||||
log.ErrorFormat("Going to create an empty results database '{0}'", databaseName);
|
||||
ExecuteMySqlCmd(string.Format("DROP DATABASE `{0}`;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}`;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}` CHARACTER SET utf8 COLLATE utf8_unicode_ci;", databaseName), userName);
|
||||
DB.DbType = bench.WaterMetersDBSettings.DbType;
|
||||
DB.ConnectionString = connectionString;
|
||||
DB.CreateEmptyDB();
|
||||
@ -364,7 +364,7 @@ namespace TBF.UI.Settings
|
||||
|
||||
log.ErrorFormat("Going to import database '{0}' from file {1}", databaseName, inputFileName);
|
||||
ExecuteMySqlCmd(string.Format("DROP DATABASE `{0}`;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}`;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("CREATE DATABASE `{0}` CHARACTER SET utf8 COLLATE utf8_unicode_ci;", databaseName), userName);
|
||||
ExecuteMySqlCmd(string.Format("SOURCE {0}", inputFileName), userName, databaseName);
|
||||
log.ErrorFormat("Database {0} was imported from file {1}", databaseName, inputFileName);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user