summaryrefslogblamecommitdiffstats
path: root/server/migrations/20190402032400-add-configid-event.js
blob: fa44b5218f1399ed90b585d8008a19116da0e089 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                                      
                                                           








                                        
                                                            

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