Files
miriamgemeinde/migrations/20240614171839-add-event-place-id-to-events.js
Torsten Schulz 61653ff407 inital commit
2024-06-15 23:01:46 +02:00

21 lines
465 B
JavaScript

'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.addColumn('events', 'event_place_id', {
type: Sequelize.INTEGER,
references: {
model: 'event_places',
key: 'id'
},
onUpdate: 'CASCADE',
onDelete: 'SET NULL',
allowNull: true
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.removeColumn('events', 'event_place_id');
}
};