feat(monitoring/site-mappings): globalize site_domain_mappings
Drop tenant scoping on site_domain_mappings now that the citation query resolves mappings without tenant filtering. Add a unique index on registrable_domain plus an updated_at column, and switch the dev-seed upsert to use ON CONFLICT (registrable_domain). Adds a SiteDomainMapping type to ops/domain for the upcoming console management UI.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
DROP INDEX IF EXISTS idx_site_domain_mappings_created;
|
||||
DROP INDEX IF EXISTS idx_site_domain_mappings_active_domain;
|
||||
DROP INDEX IF EXISTS uk_site_domain_mappings_domain;
|
||||
|
||||
ALTER TABLE site_domain_mappings
|
||||
ADD COLUMN IF NOT EXISTS tenant_id BIGINT,
|
||||
DROP COLUMN IF EXISTS updated_at;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_site_domain_mappings_lookup
|
||||
ON site_domain_mappings(tenant_id, registrable_domain, is_active);
|
||||
Reference in New Issue
Block a user