Skip to content

fix(DB): Enforce foreign key constraints in SQLite#60733

Open
provokateurin wants to merge 1 commit into
masterfrom
fix/db/sqlite-foreign-key-constraints
Open

fix(DB): Enforce foreign key constraints in SQLite#60733
provokateurin wants to merge 1 commit into
masterfrom
fix/db/sqlite-foreign-key-constraints

Conversation

@provokateurin
Copy link
Copy Markdown
Member

Foreign keys are not enforced by default in SQLite, so the referencing rows are not deleted on cascade: https://sqlite.org/pragma.html#pragma_foreign_keys

All other DBs do this (to my knowledge), so SQLite should have the same behavior.

Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin added this to the Nextcloud 35 milestone May 26, 2026
@provokateurin provokateurin requested a review from a team as a code owner May 26, 2026 13:49
@provokateurin provokateurin requested review from artonge, leftybournes and salmart-dev and removed request for a team May 26, 2026 13:49
@provokateurin provokateurin added bug 3. to review Waiting for reviews labels May 26, 2026
@provokateurin
Copy link
Copy Markdown
Member Author

/backport to stable34

@provokateurin
Copy link
Copy Markdown
Member Author

/backport to stable33

Copy link
Copy Markdown
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants