Fix cannot delete measure with linked risk
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
7
pkg/coredata/migrations/20250417T100200Z.sql
Normal file
7
pkg/coredata/migrations/20250417T100200Z.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE risks_mesures DROP CONSTRAINT IF EXISTS risks_mesures_mesure_id_fkey;
|
||||
|
||||
ALTER TABLE risks_mesures
|
||||
ADD CONSTRAINT risks_mesures_mesure_id_fkey
|
||||
FOREIGN KEY (mesure_id)
|
||||
REFERENCES mesures(id)
|
||||
ON DELETE CASCADE;
|
||||
Reference in New Issue
Block a user