summaryrefslogtreecommitdiff
path: root/lib/models/author.js
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-06-17 23:33:57 +0200
committerGitHub2018-06-17 23:33:57 +0200
commit56d78a7d6c2b49bb194cba05d1a5ff5e4b54a983 (patch)
tree009a0c047d9b537548c0a4a741d60ade9b2ee6ea /lib/models/author.js
parentf36b10abb2368459e4ba546d826c16b3232f4ba0 (diff)
parentfce735e833f91a0f1d17c518b65c4c724d1a4b4d (diff)
Merge pull request #830 from SISheogorath/feature/GDPR
GDPR compliant part 1
Diffstat (limited to '')
-rw-r--r--lib/models/author.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/models/author.js b/lib/models/author.js
index 8b4f74e5..03f832a4 100644
--- a/lib/models/author.js
+++ b/lib/models/author.js
@@ -24,12 +24,16 @@ module.exports = function (sequelize, DataTypes) {
Author.belongsTo(models.Note, {
foreignKey: 'noteId',
as: 'note',
- constraints: false
+ constraints: false,
+ onDelete: 'CASCADE',
+ hooks: true
})
Author.belongsTo(models.User, {
foreignKey: 'userId',
as: 'user',
- constraints: false
+ constraints: false,
+ onDelete: 'CASCADE',
+ hooks: true
})
}
}