From 64c6cb71fa1c0586c034bd0db7497fa657c3d368 Mon Sep 17 00:00:00 2001 From: Alexander Diana Date: Wed, 29 Nov 2023 00:37:29 +0000 Subject: [PATCH] properly reset summary on schema migration --- data/summary/types/summary.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/summary/types/summary.go b/data/summary/types/summary.go index c5e2bdb57..2d918b947 100644 --- a/data/summary/types/summary.go +++ b/data/summary/types/summary.go @@ -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()