UNPKG

727 BJavaScriptView Raw
1'use strict';
2
3var dbm;
4var type;
5var seed;
6
7/**
8 * We receive the dbmigrate dependency from dbmigrate initially.
9 * This enables us to not have to rely on NODE_PATH.
10 */
11exports.setup = function(options, seedLink) {
12 dbm = options.dbmigrate;
13 type = dbm.dataType;
14 seed = seedLink;
15};
16
17exports.up = function(db) {
18 return db.createTable('login', {
19 id: { type: 'int', primaryKey: true, autoIncrement: true},
20 uid: { type: 'int'},
21 type: { type: 'int'},
22 time: {type: 'string', length: 50},
23 });
24};
25
26exports.down = function(db) {
27 return db.dropTable('login').then(
28 function(result) {
29 },
30 function(err) {
31 }
32 );
33};
34
35exports._meta = {
36 "version": 1
37};