不要怂,就是干,撸起袖子干!

Commit 9c848b69 by Michael Pauley

Remove spaces from createTableQuery query variable

and added spaces to beginning of charset, collation & initialAutoIncrement in values during string generation
1 parent b25aca2d
Showing with 4 additions and 4 deletions
...@@ -29,7 +29,7 @@ module.exports = (function() { ...@@ -29,7 +29,7 @@ module.exports = (function() {
var self = this; var self = this;
var query = 'CREATE TABLE IF NOT EXISTS <%= table %> (<%= attributes%>)<%= comment %> ENGINE=<%= engine %> <%= charset %> <%= collation %> <%= initialAutoIncrement %>' var query = 'CREATE TABLE IF NOT EXISTS <%= table %> (<%= attributes%>) ENGINE=<%= engine %><%= comment %><%= charset %><%= collation %><%= initialAutoIncrement %>'
, primaryKeys = [] , primaryKeys = []
, foreignKeys = {} , foreignKeys = {}
, attrStr = []; , attrStr = [];
...@@ -66,9 +66,9 @@ module.exports = (function() { ...@@ -66,9 +66,9 @@ module.exports = (function() {
attributes: attrStr.join(', '), attributes: attrStr.join(', '),
comment: options.comment && Utils._.isString(options.comment) ? ' COMMENT ' + this.escape(options.comment) : '', comment: options.comment && Utils._.isString(options.comment) ? ' COMMENT ' + this.escape(options.comment) : '',
engine: options.engine, engine: options.engine,
charset: (options.charset ? 'DEFAULT CHARSET=' + options.charset : ''), charset: (options.charset ? ' DEFAULT CHARSET=' + options.charset : ''),
collation: (options.collate ? 'COLLATE ' + options.collate : ''), collation: (options.collate ? ' COLLATE ' + options.collate : ''),
initialAutoIncrement: (options.initialAutoIncrement ? 'AUTO_INCREMENT=' + options.initialAutoIncrement : '') initialAutoIncrement: (options.initialAutoIncrement ? ' AUTO_INCREMENT=' + options.initialAutoIncrement : '')
} }
, pkString = primaryKeys.map(function(pk) { return this.quoteIdentifier(pk); }.bind(this)).join(', '); , pkString = primaryKeys.map(function(pk) { return this.quoteIdentifier(pk); }.bind(this)).join(', ');
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!