summaryrefslogblamecommitdiffstats
path: root/server/migrations/20190402032400-add-configid-event.js
blob: 34e6ac9f5a7b1bed3d8ffd53898d9e46c3ed4cc9 (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', 'config', {
      type: Sequelize.INTEGER,
      onDelete: 'SET NULL',
      references: {
        model: 'configs',
        key: 'id'
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.removeColumn('events', 'config')
  }
}