Skip to content

Add ON UPDATE CASCADE to feature_flag_overrides

Administrator requested to merge main-dry-run/cc/delete-feature-flags into main

Created by: camdencheek

We soft-delete feature flags, which updates the feature flag name, which is also the feature flag's primary key. This was a problem because feature flag overrides refer to the flag's name as a foreign key, so when we update the feature flag name to soft delete, it fails with a foreign key constraint violation. This fixes the issue by adding ON UPDATE CASCADE to the foreign key constraint.

Test plan

Added a test for deleting a feature flag with an override.

Merge request reports

Loading