Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refs #7; Auto-increment, thanks pcrawfor!

  • Loading branch information...
commit 9a83127e94d90072b2724b43e277f3e66ddcf26b 1 parent 5e4ed03
@rsandor authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 migrate.js
View
7 migrate.js
@@ -74,7 +74,8 @@ function CreateTable(name) {
not_null: null,
precision: null,
scale: null,
- default_value: null
+ default_value: null,
+ auto_increment: null
};
if (arguments.length == 0) {
@@ -435,6 +436,10 @@ Encoders['mysql'] = function() {
if (column.not_null)
type += ' NOT NULL';
+ if (column.auto_increment) {
+ type += ' AUTO_INCREMENT';
+ }
+
if (column.default_value) {
type += ' DEFAULT ';
if (column.type == 'string' || column.type == 'text')
Please sign in to comment.
Something went wrong with that request. Please try again.