fix: Missing onDelete constraint
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeConstraint("webhook_subscriptions", "webhook_subscriptions_teamId_fkey")
|
||||
await queryInterface.changeColumn("webhook_subscriptions", "teamId", {
|
||||
type: Sequelize.UUID,
|
||||
allowNull: false,
|
||||
onDelete: "cascade",
|
||||
references: {
|
||||
model: "teams",
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeConstraint("webhook_subscriptions", "webhook_subscriptions_teamId_fkey")
|
||||
await queryInterface.changeColumn("webhook_subscriptions", "teamId", {
|
||||
type: Sequelize.UUID,
|
||||
allowNull: false,
|
||||
references: {
|
||||
model: "teams",
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user