Skip to content

Commit 06280ae

Browse files
author
himaniraghav3
committed
add migration
1 parent 6078188 commit 06280ae

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
up: async (queryInterface, Sequelize) => {
3+
await queryInterface.addColumn('copilot_requests', 'copilotOpportunityId', {
4+
type: Sequelize.BIGINT,
5+
allowNull: false,
6+
references: {
7+
model: 'copilot_opportunities',
8+
key: 'id',
9+
},
10+
onUpdate: 'CASCADE',
11+
onDelete: 'SET NULL',
12+
});
13+
},
14+
15+
down: async (queryInterface) => {
16+
await queryInterface.removeColumn('copilot_requests', 'copilotOpportunityId');
17+
},
18+
};

0 commit comments

Comments
 (0)