-
Notifications
You must be signed in to change notification settings - Fork 662
fix(db): cascade soft-delete tasks and events on session delete #2207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| DROP INDEX IF EXISTS session_id_active_unique; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| -- A session's client-supplied id was only unique per (id, user_id), so two | ||
| -- different users could create sessions with the same id. Deleting one then | ||
| -- cascaded to the other user's tasks and events, which are keyed by session_id | ||
| -- alone. This index makes id unique among live sessions so that can't happen. | ||
| CREATE UNIQUE INDEX IF NOT EXISTS session_id_active_unique ON session (id) WHERE deleted_at IS NULL; |
Uh oh!
There was an error while loading. Please reload this page.