db-migrate
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -12,1 +12,8 @@ ## 0.1.0 | ||
- Fixed migration table creation for PostgreSQL (via Brandon Keene) | ||
## 0.1.2 | ||
Fix: | ||
- Fix string type for PostgreSQL #14 (via Matt Huggins) | ||
- Fix renameTable method for PostgreSQL #15 (via Roman Ostolosh) |
@@ -27,2 +27,4 @@ var util = require('util'); | ||
switch(str) { | ||
case type.STRING: | ||
return 'VARCHAR'; | ||
case type.DATE_TIME: | ||
@@ -53,5 +55,4 @@ return 'TIMESTAMP'; | ||
constraint.push('SERIAL'); | ||
} else { | ||
constraint.push('PRIMARY KEY'); | ||
} | ||
constraint.push('PRIMARY KEY'); | ||
} | ||
@@ -80,3 +81,3 @@ | ||
renameTable: function(tableName, newTableName, callback) { | ||
var sql = util.format('RENAME TABLE %s TO %s', tableName, newTableName); | ||
var sql = util.format('ALTER TABLE %s RENAME TABLE TO %s', tableName, newTableName); | ||
this.runSql(sql, callback); | ||
@@ -83,0 +84,0 @@ }, |
@@ -7,3 +7,3 @@ { | ||
"keywords": ["database", "db", "migrate", "migration", "sqlite", "mysql"], | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"engines": { "node" : ">=0.6.0" }, | ||
@@ -10,0 +10,0 @@ "maintainers": [ |
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
61145
1248