mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:07:31 +00:00
fix(eventstore): fill new column with data (#2288)
* fix: smaller outage on events migration first part * fix: fill old events with sequence * fix: migration add transactions * fix: mig * rename mig * replace migration with setup step * regenerate mock * add step 20 to config * log * simplify step * limit 1000 * limit 500
This commit is contained in:
26
internal/command/setup_step20.go
Normal file
26
internal/command/setup_step20.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
)
|
||||
|
||||
type Step20 struct{}
|
||||
|
||||
func (s *Step20) Step() domain.Step {
|
||||
return domain.Step20
|
||||
}
|
||||
|
||||
func (s *Step20) execute(ctx context.Context, commandSide *Commands) error {
|
||||
return commandSide.SetupStep20(ctx, s)
|
||||
}
|
||||
|
||||
func (c *Commands) SetupStep20(ctx context.Context, step *Step20) error {
|
||||
fn := func(iam *IAMWriteModel) ([]eventstore.EventPusher, error) {
|
||||
err := c.eventstore.Step20(ctx, iam.Events[len(iam.Events)-1].Sequence())
|
||||
return nil, err
|
||||
}
|
||||
return c.setup(ctx, step, fn)
|
||||
}
|
Reference in New Issue
Block a user