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

Commit 6f3ae4d3 by Sascha Depold

Merge branch 'master' into features/first_steps_for_syntax_sugar

2 parents e3b7db2e 8e583002
...@@ -377,7 +377,7 @@ module.exports = (function() { ...@@ -377,7 +377,7 @@ module.exports = (function() {
}, options || {}) }, options || {})
return Utils._.compact([ return Utils._.compact([
"CREATE", options.indicesType, "INDEX", options.indexName, "CREATE", options.indicesType, "INDEX IF NOT EXISTS", options.indexName,
(options.indexType ? ('USING ' + options.indexType) : undefined), (options.indexType ? ('USING ' + options.indexType) : undefined),
"ON", tableName, '(' + transformedAttributes.join(', ') + ')', "ON", tableName, '(' + transformedAttributes.join(', ') + ')',
(options.parser ? "WITH PARSER " + options.parser : undefined) (options.parser ? "WITH PARSER " + options.parser : undefined)
......
...@@ -378,7 +378,7 @@ module.exports = (function() { ...@@ -378,7 +378,7 @@ module.exports = (function() {
}, },
removeIndexQuery: function(tableName, indexNameOrAttributes) { removeIndexQuery: function(tableName, indexNameOrAttributes) {
var sql = "DROP INDEX <%= indexName %>" var sql = "DROP INDEX IF EXISTS <%= indexName %>"
, indexName = indexNameOrAttributes , indexName = indexNameOrAttributes
if (typeof indexName !== 'string') { if (typeof indexName !== 'string') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!