Files
miriamgemeinde/migrations/20240614154028-create-event-contact-person.js
Torsten Schulz 61653ff407 inital commit
2024-06-15 23:01:46 +02:00

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');
}
};