Skip to content

fix: migration for cascading deletes in member removal ❗️#883

Merged
ramiAbdou merged 1 commit into
mainfrom
rami/fix
Sep 24, 2025
Merged

fix: migration for cascading deletes in member removal ❗️#883
ramiAbdou merged 1 commit into
mainfrom
rami/fix

Conversation

@ramiAbdou
Copy link
Copy Markdown
Member

Description ✏️

This PR updates a couple FK constraints to set ON DELETE CASCADE.

Type of Change 🐞

  • Feature - A non-breaking change which adds functionality.
  • Fix - A non-breaking change which fixes an issue.
  • Refactor - A change that neither fixes a bug nor adds a feature.
  • Documentation - A change only to in-code or markdown documentation.
  • Tests - A change that adds missing unit/integration tests.
  • Chore - A change that is likely none of the above.

Checklist ✅

  • I have done a self-review of my code.
  • I have manually tested my code (if applicable).
  • I have added/updated any relevant documentation (if applicable).

@ramiAbdou ramiAbdou self-assigned this Sep 24, 2025
@ramiAbdou ramiAbdou marked this pull request as ready for review September 24, 2025 04:49
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on October 23

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

.execute();
}

export async function down(_: Kysely<any>) {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Bug: Empty Down Migration Causes Irreversible Data Changes

The down migration function is empty, making this migration irreversible. If a rollback is needed, the foreign key constraints added with onDelete('cascade') in the up function cannot be reverted. This leaves the database with cascading delete behavior, which could lead to unexpected data deletion.

Fix in Cursor Fix in Web

@ramiAbdou ramiAbdou merged commit 4cb749b into main Sep 24, 2025
3 checks passed
@ramiAbdou ramiAbdou deleted the rami/fix branch September 24, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant