summaryrefslogblamecommitdiffstats
path: root/server/migrations/20180917232633-add-configid-client.js
blob: 4ff4bbb560d37aa75ac7d85b1b07a946874ea676 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                             
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.addColumn('clients', 'configId', {
      type: Sequelize.INTEGER,
      onDelete: 'SET NULL',
      references: {
        model: 'configs',
        key: 'id'
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.removeColumn('clients', 'configId')
  }
}