Wrap database name with quotes

This commit is contained in:
Anatoliy Chakkaev 2012-06-25 14:13:08 +04:00
parent 2bff27fe2d
commit 66fd977fd4
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ exports.initialize = function initializeSchema(schema, callback) {
schema.adapter = new MySQL(schema.client);
schema.adapter.schema = schema;
// schema.client.query('SET TIME_ZONE = "+04:00"', callback);
schema.client.query('USE ' + s.database, function (err) {
schema.client.query('USE `' + s.database + '`', function (err) {
if (err && err.message.match(/^unknown database/i)) {
var dbName = s.database;
schema.client.query('CREATE DATABASE ' + dbName, function (error) {