fix: cascade delete namespaces when workspace is removed #54

Open
Charon wants to merge 0 commits from feat/namespace-cascade-delete into dev
Member

Fixes #10

Changes namespaces.workspace_id FK from nullOnDelete() to cascadeOnDelete() so that namespaces are properly cleaned up when their parent workspace is deleted, instead of being orphaned with a null workspace_id.

Adds a new migration that drops the existing FK and recreates it with cascadeOnDelete(). The down() method restores the original nullOnDelete() behaviour.

Fixes #10 Changes `namespaces.workspace_id` FK from `nullOnDelete()` to `cascadeOnDelete()` so that namespaces are properly cleaned up when their parent workspace is deleted, instead of being orphaned with a null `workspace_id`. Adds a new migration that drops the existing FK and recreates it with `cascadeOnDelete()`. The `down()` method restores the original `nullOnDelete()` behaviour.
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/namespace-cascade-delete:feat/namespace-cascade-delete
git checkout feat/namespace-cascade-delete

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout dev
git merge --no-ff feat/namespace-cascade-delete
git checkout feat/namespace-cascade-delete
git rebase dev
git checkout dev
git merge --ff-only feat/namespace-cascade-delete
git checkout feat/namespace-cascade-delete
git rebase dev
git checkout dev
git merge --no-ff feat/namespace-cascade-delete
git checkout dev
git merge --squash feat/namespace-cascade-delete
git checkout dev
git merge --ff-only feat/namespace-cascade-delete
git checkout dev
git merge feat/namespace-cascade-delete
git push origin dev
Sign in to join this conversation.
No description provided.