inital commit
This commit is contained in:
20
migrations/20240614171839-add-event-place-id-to-events.js
Normal file
20
migrations/20240614171839-add-event-place-id-to-events.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user