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('buylogs', {
|
19 | id: { type: 'int', primaryKey: true, autoIncrement: true},
|
20 | domainid: {type: 'string', length: 128},
|
21 | third_no: {type: 'string', length: 128},
|
22 | trade_no: {type: 'string', length: 128, unique: true},
|
23 | total_fee: {type: 'bigint'},
|
24 | fee_type: {type: 'string', length: 50},
|
25 | product: {type: 'string', length: 128},
|
26 | product_desc: {type: 'string', length: 255},
|
27 | result: {type: 'smallint'},
|
28 | createdAt: {type: 'datetime'},
|
29 | updatedAt: {type: 'datetime'},
|
30 | });
|
31 | };
|
32 |
|
33 | exports.down = function(db) {
|
34 | return db.dropTable('buylogs').then(
|
35 | function(result) {
|
36 | },
|
37 | function(err) {
|
38 | }
|
39 | );
|
40 | };
|
41 |
|
42 | exports._meta = {
|
43 | "version": 1
|
44 | };
|