feat(fields): add instance domain (#9000)

# Which Problems Are Solved

Instance domains are only computed on read side. This can cause missing
domains if calls are executed shortly after a instance domain (or
instance) was added.

# How the Problems Are Solved

The instance domain is added to the fields table which is filled on
command side.

# Additional Changes

- added setup step to compute instance domains
- instance by host uses fields table instead of instance_domains table

# Additional Context

- part of https://github.com/zitadel/zitadel/issues/8999
This commit is contained in:
Silvan
2024-12-04 19:10:10 +01:00
committed by GitHub
parent e6fae1b352
commit 6614aacf78
8 changed files with 134 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
with domain as (
select instance_id from projections.instance_domains
where domain = $1
SELECT instance_id FROM eventstore.fields
WHERE object_type = 'instance_domain'
AND object_id = $1
AND field_name = 'domain'
), instance_features as (
select i.*
from domain d