1 | 'use strict';
|
2 |
|
3 | var dbm;
|
4 | var type;
|
5 | var seed;
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | exports.setup = function(options, seedLink) {
|
12 | dbm = options.dbmigrate;
|
13 | type = dbm.dataType;
|
14 | seed = seedLink;
|
15 | };
|
16 |
|
17 | exports.up = function(db) {
|
18 | return db.createTable('mails', {
|
19 | id: { type: 'int', primaryKey: true, autoIncrement: true},
|
20 | src: {type: 'string', length: 100},
|
21 | dst: {type: 'string', length: 100},
|
22 | content: {type: 'string', length: 1000},
|
23 | time: {type: 'int'},
|
24 | state: {type: 'int', defaultValue:0},
|
25 | sn: {type: 'string', length: 100},
|
26 | });
|
27 | };
|
28 |
|
29 | exports.down = function(db) {
|
30 | return db.dropTable('mails').then(
|
31 | function(result) {
|
32 | },
|
33 | function(err) {
|
34 | }
|
35 | );
|
36 | };
|
37 |
|
38 | exports._meta = {
|
39 | "version": 1
|
40 | };
|