Use Plesk CLI subscription info to populate status; domains inherit status; UI badges
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
-- One-time backfill: align existing domain status with linked subscription status
|
||||
update public.plesk_domains d
|
||||
set status = s.status
|
||||
set status = coalesce(s.status, 'unknown')
|
||||
from public.plesk_subscriptions s
|
||||
where d.subscription_id = s.id
|
||||
and d.agency_id = s.agency_id
|
||||
and (d.status is null or d.status = 'unknown');
|
||||
|
||||
update public.plesk_subscriptions
|
||||
set status = 'unknown'
|
||||
where status is null;
|
||||
and d.agency_id = s.agency_id;
|
||||
Reference in New Issue
Block a user