feat: remove domains whose zones vanished at the provider on import
This commit is contained in:
@@ -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 *;
|
||||
|
||||
Reference in New Issue
Block a user