Fix incorrectly formatted timestamps (#2918)

* Update updated_at when adding file to object
* Use models.SQLTimestamp for timestamps
* Add data massage to fix incorrect timestamps
This commit is contained in:
WithoutPants
2022-09-19 14:53:46 +10:00
committed by GitHub
parent 2564351265
commit 1207629a76
9 changed files with 175 additions and 46 deletions

View File

@@ -133,6 +133,11 @@ func (h *ScanHandler) associateExisting(ctx context.Context, existing []*models.
if err := h.CreatorUpdater.AddFileID(ctx, s.ID, f.ID); err != nil {
return fmt.Errorf("adding file to scene: %w", err)
}
// update updated_at time
if _, err := h.CreatorUpdater.UpdatePartial(ctx, s.ID, models.NewScenePartial()); err != nil {
return fmt.Errorf("updating scene: %w", err)
}
}
}