Skip to content

Commit

Permalink
properly reset summary on schema migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Roukoswarf committed Nov 29, 2023
1 parent d83fff3 commit 64c6cb7
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 64c6cb7

Please sign in to comment.