mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-05 18:38:52 +00:00
feat: migrate unique constraints v1 to v2 (#1274)
* fix: unique migration * fix: unique migration * fix: remove migrations * fix: member events
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
uniqueGrantType = "project_Grant"
|
||||
UniqueGrantType = "project_grant"
|
||||
grantEventTypePrefix = projectEventTypePrefix + "grant."
|
||||
GrantAddedType = grantEventTypePrefix + "added"
|
||||
GrantChangedType = grantEventTypePrefix + "changed"
|
||||
@@ -22,14 +22,14 @@ var (
|
||||
|
||||
func NewAddProjectGrantUniqueConstraint(grantedOrgID, projectID string) *eventstore.EventUniqueConstraint {
|
||||
return eventstore.NewAddEventUniqueConstraint(
|
||||
uniqueRoleType,
|
||||
UniqueRoleType,
|
||||
fmt.Sprintf("%s:%s", grantedOrgID, projectID),
|
||||
"Errors.Project.Grant.AlreadyExists")
|
||||
}
|
||||
|
||||
func NewRemoveProjectGrantUniqueConstraint(grantedOrgID, projectID string) *eventstore.EventUniqueConstraint {
|
||||
return eventstore.NewRemoveEventUniqueConstraint(
|
||||
uniqueRoleType,
|
||||
UniqueRoleType,
|
||||
fmt.Sprintf("%s:%s", grantedOrgID, projectID))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user