mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-24 21:48:46 +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:
@@ -11,7 +11,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
uniqueAppNameType = "appname"
|
||||
UniqueAppNameType = "appname"
|
||||
applicationEventTypePrefix = projectEventTypePrefix + "application."
|
||||
ApplicationAddedType = applicationEventTypePrefix + "added"
|
||||
ApplicationChangedType = applicationEventTypePrefix + "changed"
|
||||
@@ -22,14 +22,14 @@ const (
|
||||
|
||||
func NewAddApplicationUniqueConstraint(name, projectID string) *eventstore.EventUniqueConstraint {
|
||||
return eventstore.NewAddEventUniqueConstraint(
|
||||
uniqueAppNameType,
|
||||
UniqueAppNameType,
|
||||
fmt.Sprintf("%s:%s", name, projectID),
|
||||
"Errors.Project.App.AlreadyExists")
|
||||
}
|
||||
|
||||
func NewRemoveApplicationUniqueConstraint(name, projectID string) *eventstore.EventUniqueConstraint {
|
||||
return eventstore.NewRemoveEventUniqueConstraint(
|
||||
uniqueAppNameType,
|
||||
UniqueAppNameType,
|
||||
fmt.Sprintf("%s:%s", name, projectID))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user