mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 03:57:32 +00:00
fixup! Merge branch 'main' into fix_adding_org_same_id_twice
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
|
||||
const (
|
||||
uniqueOrgname = "org_name"
|
||||
uniqueOrgID = "org_id"
|
||||
OrgAddedEventType = orgEventTypePrefix + "added"
|
||||
OrgChangedEventType = orgEventTypePrefix + "changed"
|
||||
OrgDeactivatedEventType = orgEventTypePrefix + "deactivated"
|
||||
@@ -25,14 +26,14 @@ const (
|
||||
|
||||
func NewAddOrgIDUniqueConstraint(orgID string) *eventstore.UniqueConstraint {
|
||||
return eventstore.NewAddEventUniqueConstraint(
|
||||
uniqueOrgname,
|
||||
uniqueOrgID,
|
||||
orgID,
|
||||
"Errors.Org.AlreadyExists")
|
||||
}
|
||||
|
||||
func NewRemoveOrgIDUniqueConstraint(orgID string) *eventstore.UniqueConstraint {
|
||||
return eventstore.NewRemoveUniqueConstraint(
|
||||
uniqueOrgname,
|
||||
uniqueOrgID,
|
||||
orgID)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user