mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-27 18:11:42 +00:00
fix: update config to commands (and queries) (#1342)
* fix: adaot config to commands (and queries) * remove dependency on vv2 in v1 * add queries user to operator * set password for queries on tests * set password for queries on tests * fix config
This commit is contained in:
@@ -16,17 +16,17 @@ func (s *Step11) Step() domain.Step {
|
||||
return domain.Step11
|
||||
}
|
||||
|
||||
func (s *Step11) execute(ctx context.Context, commandSide *CommandSide) error {
|
||||
func (s *Step11) execute(ctx context.Context, commandSide *Commands) error {
|
||||
return commandSide.SetupStep11(ctx, s)
|
||||
}
|
||||
|
||||
func (r *CommandSide) SetupStep11(ctx context.Context, step *Step11) error {
|
||||
func (c *Commands) SetupStep11(ctx context.Context, step *Step11) error {
|
||||
fn := func(iam *IAMWriteModel) ([]eventstore.EventPusher, error) {
|
||||
iamAgg := IAMAggregateFromWriteModel(&iam.WriteModel)
|
||||
var uniqueContraintMigrations []*domain.UniqueConstraintMigration
|
||||
if step.MigrateV1EventstoreToV2 {
|
||||
uniqueConstraints := NewUniqueConstraintReadModel(ctx, r)
|
||||
err := r.eventstore.FilterToQueryReducer(ctx, uniqueConstraints)
|
||||
uniqueConstraints := NewUniqueConstraintReadModel(ctx, c)
|
||||
err := c.eventstore.FilterToQueryReducer(ctx, uniqueConstraints)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -35,5 +35,5 @@ func (r *CommandSide) SetupStep11(ctx context.Context, step *Step11) error {
|
||||
logging.Log("SETUP-M9fsd").Info("migrate v1 eventstore to v2")
|
||||
return []eventstore.EventPusher{iam_repo.NewMigrateUniqueConstraintEvent(ctx, iamAgg, uniqueContraintMigrations)}, nil
|
||||
}
|
||||
return r.setup(ctx, step, fn)
|
||||
return c.setup(ctx, step, fn)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user