mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
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:
@@ -106,6 +106,14 @@ func (e *InstanceRemovedEvent) UniqueConstraints() []*eventstore.UniqueConstrain
|
||||
return constraints
|
||||
}
|
||||
|
||||
func (e *InstanceRemovedEvent) Fields() []*eventstore.FieldOperation {
|
||||
return []*eventstore.FieldOperation{
|
||||
eventstore.RemoveSearchFields(map[eventstore.FieldType]any{
|
||||
eventstore.FieldTypeInstanceID: e.Aggregate().ID,
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
func NewInstanceRemovedEvent(ctx context.Context, aggregate *eventstore.Aggregate, name string, domains []string) *InstanceRemovedEvent {
|
||||
return &InstanceRemovedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
|
Reference in New Issue
Block a user