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('ally_news', {
|
19 | id: { type: 'int', autoIncrement: true, primaryKey: true},
|
20 | aid: {type: 'int', defaultValue: 0},
|
21 | newstype: {type: 'int', defaultValue: 0},
|
22 | content: {type: 'string', length: 500},
|
23 | buildTime: {type: 'int', defaultValue: 0},
|
24 | });
|
25 | };
|
26 |
|
27 | exports.down = function(db) {
|
28 | return db.dropTable('ally_news').then(
|
29 | function(result) {
|
30 | },
|
31 | function(err) {
|
32 | }
|
33 | );
|
34 | };
|
35 |
|
36 | exports._meta = {
|
37 | "version": 1
|
38 | };
|