Merge pull request 'Delete options and responses together with their poll' (#30) from fix/poll-delete-cascade into main
Reviewed-on: #30
This commit was merged in pull request #30.
This commit is contained in:
commit
f536ea89fc
4 files changed
+71
-1
No files matched your search
@@ -48,7 +48,9 @@ class PollsTable extends Table
|
||||
'foreignKey' => 'poll_id',
|
||||
'sort' => ['Slides.position' => 'ASC', 'Slides.id' => 'ASC'],
|
||||
'dependent' => true,
|
||||
'cascadeCallbacks' => false,
|
||||
// Delete slide by slide so their options and responses go too. Do not rely on
|
||||
// ON DELETE CASCADE: SQLite does not enforce foreign keys by default.
|
||||
'cascadeCallbacks' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user