mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 17:27:31 +00:00
fix(milestones): use previous spelling for milestone types (#8886)
# Which Problems Are Solved https://github.com/zitadel/zitadel/pull/8788 accidentally changed the spelling of milestone types from PascalCase to snake_case. This breaks systems where `milestone.pushed` events already exist. # How the Problems Are Solved - Use PascalCase again - Prefix event types with v2. (Previous pushed event type was anyway ignored). - Create `milstones3` projection # Additional Changes None # Additional Context relates to #8788
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
//go:generate enumer -type Type -json -linecomment -transform=snake
|
||||
//go:generate enumer -type Type -json -linecomment
|
||||
type Type int
|
||||
|
||||
const (
|
||||
@@ -20,7 +20,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
eventTypePrefix = "milestone."
|
||||
eventTypePrefix = "milestone.v2."
|
||||
ReachedEventType = eventTypePrefix + "reached"
|
||||
PushedEventType = eventTypePrefix + "pushed"
|
||||
)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Code generated by "enumer -type Type -json -linecomment -transform=snake"; DO NOT EDIT.
|
||||
// Code generated by "enumer -type Type -json -linecomment"; DO NOT EDIT.
|
||||
|
||||
package milestone
|
||||
|
||||
@@ -8,11 +8,11 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const _TypeName = "instance_createdauthentication_succeeded_on_instanceproject_createdapplication_createdauthentication_succeeded_on_applicationinstance_deleted"
|
||||
const _TypeName = "InstanceCreatedAuthenticationSucceededOnInstanceProjectCreatedApplicationCreatedAuthenticationSucceededOnApplicationInstanceDeleted"
|
||||
|
||||
var _TypeIndex = [...]uint8{0, 16, 52, 67, 86, 125, 141}
|
||||
var _TypeIndex = [...]uint8{0, 15, 48, 62, 80, 116, 131}
|
||||
|
||||
const _TypeLowerName = "instance_createdauthentication_succeeded_on_instanceproject_createdapplication_createdauthentication_succeeded_on_applicationinstance_deleted"
|
||||
const _TypeLowerName = "instancecreatedauthenticationsucceededoninstanceprojectcreatedapplicationcreatedauthenticationsucceededonapplicationinstancedeleted"
|
||||
|
||||
func (i Type) String() string {
|
||||
i -= 1
|
||||
@@ -37,27 +37,27 @@ func _TypeNoOp() {
|
||||
var _TypeValues = []Type{InstanceCreated, AuthenticationSucceededOnInstance, ProjectCreated, ApplicationCreated, AuthenticationSucceededOnApplication, InstanceDeleted}
|
||||
|
||||
var _TypeNameToValueMap = map[string]Type{
|
||||
_TypeName[0:16]: InstanceCreated,
|
||||
_TypeLowerName[0:16]: InstanceCreated,
|
||||
_TypeName[16:52]: AuthenticationSucceededOnInstance,
|
||||
_TypeLowerName[16:52]: AuthenticationSucceededOnInstance,
|
||||
_TypeName[52:67]: ProjectCreated,
|
||||
_TypeLowerName[52:67]: ProjectCreated,
|
||||
_TypeName[67:86]: ApplicationCreated,
|
||||
_TypeLowerName[67:86]: ApplicationCreated,
|
||||
_TypeName[86:125]: AuthenticationSucceededOnApplication,
|
||||
_TypeLowerName[86:125]: AuthenticationSucceededOnApplication,
|
||||
_TypeName[125:141]: InstanceDeleted,
|
||||
_TypeLowerName[125:141]: InstanceDeleted,
|
||||
_TypeName[0:15]: InstanceCreated,
|
||||
_TypeLowerName[0:15]: InstanceCreated,
|
||||
_TypeName[15:48]: AuthenticationSucceededOnInstance,
|
||||
_TypeLowerName[15:48]: AuthenticationSucceededOnInstance,
|
||||
_TypeName[48:62]: ProjectCreated,
|
||||
_TypeLowerName[48:62]: ProjectCreated,
|
||||
_TypeName[62:80]: ApplicationCreated,
|
||||
_TypeLowerName[62:80]: ApplicationCreated,
|
||||
_TypeName[80:116]: AuthenticationSucceededOnApplication,
|
||||
_TypeLowerName[80:116]: AuthenticationSucceededOnApplication,
|
||||
_TypeName[116:131]: InstanceDeleted,
|
||||
_TypeLowerName[116:131]: InstanceDeleted,
|
||||
}
|
||||
|
||||
var _TypeNames = []string{
|
||||
_TypeName[0:16],
|
||||
_TypeName[16:52],
|
||||
_TypeName[52:67],
|
||||
_TypeName[67:86],
|
||||
_TypeName[86:125],
|
||||
_TypeName[125:141],
|
||||
_TypeName[0:15],
|
||||
_TypeName[15:48],
|
||||
_TypeName[48:62],
|
||||
_TypeName[62:80],
|
||||
_TypeName[80:116],
|
||||
_TypeName[116:131],
|
||||
}
|
||||
|
||||
// TypeString retrieves an enum value from the enum constants string name.
|
||||
|
Reference in New Issue
Block a user