mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:07:36 +00:00
feat: delete organizations (#6083)
* feat: delete organizations * feat: tests and delete all that depends on org * fix: grpc delete description * fix: get back reduce OrgRemovedEvent * fix: add @muhlemmer review suggestions * fix: new e2e for add/delete org
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
OrgProjectionTable = "projections.orgs"
|
||||
OrgProjectionTable = "projections.orgs1"
|
||||
|
||||
OrgColumnID = "id"
|
||||
OrgColumnCreationDate = "creation_date"
|
||||
@@ -202,13 +202,8 @@ func (p *orgProjection) reduceOrgRemoved(event eventstore.Event) (*handler.State
|
||||
if !ok {
|
||||
return nil, errors.ThrowInvalidArgumentf(nil, "PROJE-DgMSg", "reduce.wrong.event.type %s", org.OrgRemovedEventType)
|
||||
}
|
||||
return crdb.NewUpdateStatement(
|
||||
return crdb.NewDeleteStatement(
|
||||
e,
|
||||
[]handler.Column{
|
||||
handler.NewCol(OrgColumnChangeDate, e.CreationDate()),
|
||||
handler.NewCol(OrgColumnSequence, e.Sequence()),
|
||||
handler.NewCol(OrgColumnState, domain.OrgStateRemoved),
|
||||
},
|
||||
[]handler.Condition{
|
||||
handler.NewCond(OrgColumnID, e.Aggregate().ID),
|
||||
handler.NewCond(OrgColumnInstanceID, e.Aggregate().InstanceID),
|
||||
|
Reference in New Issue
Block a user