db-migrate
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -148,1 +148,7 @@ ## 0.1.0 | ||
- Updated README.md documentation #98 (via @acco) | ||
## 0.5.1 | ||
Improvement: | ||
- Add a force-exit flag #108 (via @codeaholics) | ||
- Provide close callback for MySQL driver #107 (via @codeaholics) |
@@ -124,7 +124,7 @@ var util = require('util'); | ||
}, | ||
renameColumn: function(tableName, oldColumnName, newColumnName, callback) { | ||
var self = this, columnTypeSql = util.format("SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '%s' AND COLUMN_NAME = '%s'", tableName, oldColumnName); | ||
this.all(columnTypeSql, function(err, result) { | ||
var columnType = result[0].COLUMN_TYPE; | ||
var columnType = result[0].COLUMN_TYPE; | ||
var alterSql = util.format("ALTER TABLE %s CHANGE %s %s %s", tableName, oldColumnName, newColumnName, columnType); | ||
@@ -159,4 +159,4 @@ self.runSql(alterSql, callback); | ||
close: function() { | ||
this.connection.end(); | ||
close: function(callback) { | ||
this.connection.end(callback); | ||
} | ||
@@ -163,0 +163,0 @@ |
@@ -204,4 +204,5 @@ var util = require('util'); | ||
close: function() { | ||
close: function(callback) { | ||
this.connection.end(); | ||
callback(null); | ||
} | ||
@@ -208,0 +209,0 @@ |
@@ -68,4 +68,5 @@ var util = require('util'); | ||
close: function() { | ||
close: function(callback) { | ||
this.connection.close(); | ||
callback(null); | ||
} | ||
@@ -72,0 +73,0 @@ |
@@ -14,3 +14,3 @@ { | ||
], | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"engines": { | ||
@@ -17,0 +17,0 @@ "node": ">=0.6.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92548
31
1537