mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
fix(permissions_v2): add membership fields migration (#9199)
# Which Problems Are Solved Memberships did not have a fields table fill migration. # How the Problems Are Solved Add filling of membership fields to the repeatable steps. # Additional Changes - Use the same repeatable step for multiple fill fields handlers. - Fix an error for PostgreSQL 15 where a subquery in a `FROM` clause needs an alias ing the `permitted_orgs` function. # Additional Context - Part of https://github.com/zitadel/zitadel/issues/9188 - Introduced in https://github.com/zitadel/zitadel/pull/9152
This commit is contained in:
@@ -32,6 +32,9 @@ func (f *fieldProjection) Reducers() []AggregateReducer {
|
||||
|
||||
var _ Projection = (*fieldProjection)(nil)
|
||||
|
||||
// NewFieldHandler returns a projection handler which backfills the `eventstore.fields` table with historic events which
|
||||
// might have existed before they had and Field Operations defined.
|
||||
// The events are filtered by the mapped aggregate types and each event type for that aggregate.
|
||||
func NewFieldHandler(config *Config, name string, eventTypes map[eventstore.AggregateType][]eventstore.EventType) *FieldHandler {
|
||||
return &FieldHandler{
|
||||
Handler: Handler{
|
||||
@@ -51,6 +54,7 @@ func NewFieldHandler(config *Config, name string, eventTypes map[eventstore.Aggr
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger executes the backfill job of events for the instance currently in the context.
|
||||
func (h *FieldHandler) Trigger(ctx context.Context, opts ...TriggerOpt) (err error) {
|
||||
config := new(triggerConfig)
|
||||
for _, opt := range opts {
|
||||
|
Reference in New Issue
Block a user