mirror of
https://github.com/andwati/zitadel.git
synced 2026-12-01 00:18:51 +00:00
fix(step11): execute step 10 to make sure events are in correct order
This commit is contained in:
@@ -13,10 +13,16 @@ var (
|
||||
)
|
||||
|
||||
type AddEventCreatedAt struct {
|
||||
step10 *CorrectCreationDate
|
||||
dbClient *database.DB
|
||||
}
|
||||
|
||||
func (mig *AddEventCreatedAt) Execute(ctx context.Context) error {
|
||||
// execute step 10 again because events created after the first execution of step 10
|
||||
// could still have the wrong ordering of sequences and creation date
|
||||
if err := mig.step10.Execute(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
_, err := mig.dbClient.ExecContext(ctx, addEventCreatedAt)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user