diff --git a/scripts/cleanup-orphan-checks.sh b/scripts/cleanup-orphan-checks.sh index a397313..a99db5c 100755 --- a/scripts/cleanup-orphan-checks.sh +++ b/scripts/cleanup-orphan-checks.sh @@ -49,10 +49,17 @@ fi echo echo "== applying (config_mutation) ==" -# Delete check_defs first (FK), then the orphan check entities. +# check_defs first, then the dependent rows an entity owns (status, signals, +# metrics), then the orphan check entities. FKs prevent a plain entity delete. $PSQL_CMD -v ON_ERROR_STOP=1 <