mirror of
https://github.com/outline/outline.git
synced 2026-11-22 14:01:41 +03:00
chore: Webhook subscription creator delete cascade
This commit is contained in:
1 parent
ed175c84ff
commit
a08adc930d
1 file changed
+24
@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeConstraint("webhook_subscriptions", "webhook_subscriptions_createdById_fkey")
|
||||
await queryInterface.changeColumn("webhook_subscriptions", "createdById", {
|
||||
type: Sequelize.UUID,
|
||||
onDelete: "cascade",
|
||||
references: {
|
||||
model: "users",
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
down: async (queryInterface, Sequelize) => {
|
||||
await queryInterface.removeConstraint("webhook_subscriptions", "webhook_subscriptions_createdById_fkey")
|
||||
await queryInterface.changeColumn("webhook_subscriptions", "createdById", {
|
||||
type: Sequelize.UUID,
|
||||
references: {
|
||||
model: "users",
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user