feat: remove domains whose zones vanished at the provider on import

This commit is contained in:
vasyansk committed 2026-08-19 18:32:10 +07:00
1 parent e00648baf7
commit 4d05271f10
8 files changed
+310 -37

No files matched your search

+5
View File
@@ -37,3 +37,8 @@ UPDATE domains SET last_check_status = $2 WHERE id = $1 AND project_id = $3;
-- name: CountDriftDomains :one
SELECT count(*) FROM domains WHERE last_check_status = 'drift';
-- name: DeleteDomainsNotInZones :many
DELETE FROM domains
WHERE project_id = $1 AND provider_account_id = $2 AND zone_id <> ALL($3::text[])
RETURNING *;