Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of https://github.com/nearinfinity/node-db-migrate

  • Loading branch information...
commit a61f511414ac3ab303b104aacba13b7e2f096be7 2 parents 5cd9ac5 + 9b34373
Roman Ostolosh authored
Showing with 18 additions and 1 deletion.
  1. +5 −0 CHANGELOG.md
  2. +12 −0 lib/driver/pg.js
  3. +1 −1  package.json
5 CHANGELOG.md
View
@@ -4,3 +4,8 @@ New Features:
- Added support for PostgreSQL (via Roman Ostolosh)
+## 0.1.1
+
+Fix:
+
+ - Fixed migration table creation for PostgreSQL (via Brandon Keene)
12 lib/driver/pg.js
View
@@ -32,6 +32,18 @@ var PgDriver = Base.extend({
return this._super(str);
},
+ createMigrationsTable: function(callback) {
+ var options = {
+ columns: {
+ 'id': { type: type.INTEGER, notNull: true, primaryKey: true, autoIncrement: true },
+ 'name': { type: type.STRING, length: 255, notNull: true},
+ 'run_on': { type: type.DATE_TIME, notNull: true}
+ },
+ ifNotExists: false
+ }
+ this.createTable('migrations', options, callback);
+ },
+
createColumnConstraint: function(spec, options) {
var constraint = [];
if (spec.primaryKey && options.emitPrimaryKey) {
2  package.json
View
@@ -4,7 +4,7 @@
"author": "Jeff Kunkle <jeff.kunkle@nearinfinity.com>",
"bin": "./bin/db-migrate",
"keywords": ["database", "db", "migrate", "migration", "sqlite", "mysql"],
- "version": "0.1.0",
+ "version": "0.1.1",
"engines": { "node" : ">=0.6.0" },
"maintainers": [
{ "name": "Jeff Kunkle", "email": "jeff.kunkle@nearinfinity.com" },
Please sign in to comment.
Something went wrong with that request. Please try again.