mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
chore(db): refactoring instance+org tables to not use deleted_at (#10270)
This commit is contained in:
@@ -97,11 +97,8 @@ func (p *instanceRelationalProjection) reduceInstanceDelete(event eventstore.Eve
|
||||
if !ok {
|
||||
return nil, zerrors.ThrowInvalidArgumentf(nil, "HANDL-so2am1", "reduce.wrong.event.type %s", instance.InstanceChangedEventType)
|
||||
}
|
||||
return handler.NewUpdateStatement(
|
||||
return handler.NewDeleteStatement(
|
||||
e,
|
||||
[]handler.Column{
|
||||
handler.NewCol(DeletedAt, e.CreationDate()),
|
||||
},
|
||||
[]handler.Condition{
|
||||
handler.NewCond(InstanceColumnID, e.Aggregate().InstanceID),
|
||||
},
|
||||
|
@@ -171,12 +171,8 @@ func (p *orgRelationalProjection) reduceOrgRelationalRemoved(event eventstore.Ev
|
||||
if !ok {
|
||||
return nil, zerrors.ThrowInvalidArgumentf(nil, "PROJE-DGm9g", "reduce.wrong.event.type %s", org.OrgRemovedEventType)
|
||||
}
|
||||
return handler.NewUpdateStatement(
|
||||
return handler.NewDeleteStatement(
|
||||
e,
|
||||
[]handler.Column{
|
||||
handler.NewCol(UpdatedAt, e.CreationDate()),
|
||||
handler.NewCol(DeletedAt, e.CreationDate()),
|
||||
},
|
||||
[]handler.Condition{
|
||||
handler.NewCond(OrgColumnID, e.Aggregate().ID),
|
||||
handler.NewCond(OrgColumnInstanceID, e.Aggregate().InstanceID),
|
||||
|
@@ -4,5 +4,4 @@ const (
|
||||
State = "state"
|
||||
CreatedAt = "created_at"
|
||||
UpdatedAt = "updated_at"
|
||||
DeletedAt = "deleted_at"
|
||||
)
|
||||
|
Reference in New Issue
Block a user