mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-21 04:18:46 +00:00
fix: use hash to compare user metadata value (#10749)
# Which Problems Are Solved Depending on the metadata values (already existing), the newly created index (#10415) cannot be created or error in the future. # How the Problems Are Solved - Create the index using `sha256` and change the query to use sha256 as well when comparing bytes values such as user_metadata. - Added a setup step to cleanup potentially created index on `projections.user_metadata5` # Additional Changes None # Additional Context - relates to #10415 - requires backport to v4.x
This commit is contained in:
@@ -222,6 +222,7 @@ func Setup(ctx context.Context, config *Config, steps *Steps, masterKey string)
|
||||
steps.s62HTTPProviderAddSigningKey = &HTTPProviderAddSigningKey{dbClient: dbClient}
|
||||
steps.s63AlterResourceCounts = &AlterResourceCounts{dbClient: dbClient}
|
||||
steps.s64ChangePushPosition = &ChangePushPosition{dbClient: dbClient}
|
||||
steps.s65FixUserMetadata5Index = &FixUserMetadata5Index{dbClient: dbClient}
|
||||
|
||||
err = projection.Create(ctx, dbClient, eventstoreClient, config.Projections, nil, nil, nil)
|
||||
logging.OnError(err).Fatal("unable to start projections")
|
||||
@@ -274,6 +275,7 @@ func Setup(ctx context.Context, config *Config, steps *Steps, masterKey string)
|
||||
steps.s62HTTPProviderAddSigningKey,
|
||||
steps.s63AlterResourceCounts,
|
||||
steps.s64ChangePushPosition,
|
||||
steps.s65FixUserMetadata5Index,
|
||||
} {
|
||||
setupErr = executeMigration(ctx, eventstoreClient, step, "migration failed")
|
||||
if setupErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user