mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 13:07:46 +00:00
fix: remove fields entry with instance domain remove (#10406)
# Which Problems Are Solved Fields table entry is not removed when removing instance domain. # How the Problems Are Solved Remove the fields entry, instead of setting it. # Additional Changes None # Additional Context Needs to be backported to v3.x
This commit is contained in:
@@ -148,23 +148,10 @@ func (e *DomainRemovedEvent) UniqueConstraints() []*eventstore.UniqueConstraint
|
|||||||
|
|
||||||
func (e *DomainRemovedEvent) Fields() []*eventstore.FieldOperation {
|
func (e *DomainRemovedEvent) Fields() []*eventstore.FieldOperation {
|
||||||
return []*eventstore.FieldOperation{
|
return []*eventstore.FieldOperation{
|
||||||
eventstore.SetField(
|
eventstore.RemoveSearchFieldsByAggregateAndObjectAndField(
|
||||||
e.Aggregate(),
|
e.Aggregate(),
|
||||||
domainSearchObject(e.Domain),
|
domainSearchObject(e.Domain),
|
||||||
InstanceDomainSearchField,
|
InstanceDomainSearchField,
|
||||||
&eventstore.Value{
|
|
||||||
Value: e.Domain,
|
|
||||||
MustBeUnique: true,
|
|
||||||
ShouldIndex: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
eventstore.FieldTypeInstanceID,
|
|
||||||
eventstore.FieldTypeResourceOwner,
|
|
||||||
eventstore.FieldTypeAggregateType,
|
|
||||||
eventstore.FieldTypeAggregateID,
|
|
||||||
eventstore.FieldTypeObjectType,
|
|
||||||
eventstore.FieldTypeObjectID,
|
|
||||||
eventstore.FieldTypeFieldName,
|
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user