29 lines
677 B
JavaScript
29 lines
677 B
JavaScript
'use strict';
|
|
module.exports = {
|
|
up: async (queryInterface, Sequelize) => {
|
|
await queryInterface.createTable('EventContactPersons', {
|
|
event_id: {
|
|
type: Sequelize.INTEGER,
|
|
references: {
|
|
model: 'Events',
|
|
key: 'id'
|
|
},
|
|
onUpdate: 'CASCADE',
|
|
onDelete: 'CASCADE'
|
|
},
|
|
contact_person_id: {
|
|
type: Sequelize.INTEGER,
|
|
references: {
|
|
model: 'contact_persons',
|
|
key: 'id'
|
|
},
|
|
onUpdate: 'CASCADE',
|
|
onDelete: 'CASCADE'
|
|
}
|
|
});
|
|
},
|
|
down: async (queryInterface, Sequelize) => {
|
|
await queryInterface.dropTable('EventContactPersons');
|
|
}
|
|
};
|