fix(step11): execute step 10 to make sure events are in correct order

This commit is contained in:
adlerhurst
2023-05-11 11:53:52 +02:00
parent defa429eb7
commit 4d7a733e11
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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
}