feat: update area management to implement hard delete and adjust related references

This commit is contained in:
gabdevele
2026-06-15 15:50:12 +02:00 Unverified
parent bf85168914
commit 4f80d7f995
9 changed files with 30 additions and 24 deletions
+4 -2
View File
@@ -28,7 +28,7 @@ Schema truth is `migrations/*.sql`. This file is compact human map of current DB
- `report_categories`
citizen-facing report categories, `active`
- `areas`
named municipal areas, GeoJSON polygon in `boundary_geojson`, `active`
named municipal areas, GeoJSON polygon in `boundary_geojson`
- `team_categories`
category of external intervention team
- `teams`
@@ -92,7 +92,9 @@ Schema truth is `migrations/*.sql`. This file is compact human map of current DB
- `reward_events(report_id, reason)` unique
- `api_tokens.token_hash` unique
- `intervention_access_links.token_hash` unique
- category/team/area delete behavior is soft delete via `active = FALSE`
- category/team delete behavior is soft delete via `active = FALSE`
- area delete behavior is hard delete; linked `reports.area_id` and `teams.area_id`
become `NULL`
## Current Query Model
- No generated ORM models