Skip to content

Commit

Permalink
clear summary properly on schema migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Roukoswarf committed Nov 30, 2023
1 parent f8e6c2c commit 0a11428
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/summary/types/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func (s *Summary[T, A]) SetOutdated(reason string) {
set.Append(s.Dates.OutdatedReason...)
}

if reason == OutdatedReasonSchemaMigration {
*s = *Create[T, A](s.UserID)
}

s.Dates.OutdatedReason = set.ToSlice()

timestamp := time.Now().Truncate(time.Millisecond).UTC()
Expand Down

0 comments on commit 0a11428

Please sign in to comment.