inital commit
This commit is contained in:
28
migrations/20240614154028-create-event-contact-person.js
Normal file
28
migrations/20240614154028-create-event-contact-person.js
Normal file
@@ -0,0 +1,28 @@
|
||||
'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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user