aboutsummaryrefslogtreecommitdiffstats
path: root/migrations/20190113193839-create_orders.js
blob: 01e1ffb1018fbc44c84b0a337f33cc21ed425a73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
'use strict';

module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('orders', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      amount: { type: Sequelize.INTEGER },
      price: { type: Sequelize.INTEGER },
      type: { type: Sequelize.STRING },
      pair: { type: Sequelize.STRING },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('orders');
  },
};