summaryrefslogtreecommitdiffstats
path: root/server/migrations/20180715193710-create-backend.js
blob: 3b1a730a33447511179358a86c429f5d081ace61 (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('backends', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        type: Sequelize.STRING
      },
      type: {
        type: Sequelize.STRING
      },
      credentials: {
        type: Sequelize.STRING(2048)
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('backends');
  }
};