summaryrefslogblamecommitdiffstats
path: root/server/migrations/20181009154133-create-registrationhook_x_group.js
blob: 5d52a5bcf531266587a6129559f6bf1c3cfa592f (plain) (tree)





























                                                                   
'use strict'
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('registrationhook_x_group', {
      registrationhookId: {
        primaryKey: true,
        allowNull: false,
        type: Sequelize.INTEGER,
        onDelete: 'cascade',
        references: {
          model: 'registrationhooks',
          key: 'id'
        }
      },
      groupId: {
        primaryKey: true,
        allowNull: false,
        type: Sequelize.INTEGER,
        onDelete: 'cascade',
        references: {
          model: 'groups',
          key: 'id'
        }
      }
    })
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('registrationhook_x_group')
  }
}