aboutsummaryrefslogtreecommitdiffstats
path: root/migrations/20131110050923-add-users.js
blob: f22dabc29b53dd40c398b3d7f500c3da3302e883 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var dbm = require('db-migrate');
var type = dbm.dataType;

exports.up = function(db, callback) {
  db.createTable('users', {
      id: { type: 'int', primaryKey: true, autoIncrement: true },
      username: { type: 'string' },
      password: { type: 'string' },
      last_login: { type: 'datetime' }
    }, callback);
};

exports.down = function(db, callback) {
  db.dropTable('users', callback);
};