analytics icon indicating copy to clipboard operation
analytics copied to clipboard

Migration: Increase the precision of subscription timestamp fields

Open RobertJoonas opened this issue 1 year ago • 0 comments

Changes

Motivation: Paddle sometimes sends us two webhooks at the same time when a subscription is updated. We only need to count the latest one of those, for which we need more precision than 1s.

The migration will set both inserted_at and updated_at columns in the subscriptions table to use the :naive_datetime_usec type instead of just :naive_datetime. In practice, we currently need more precision only on the updated_at field. But I suppose it's better to keep the type between both timestamp fields consistent.

Tests

  • [x] Automated tests have been added
  • [ ] This PR does not require tests

Changelog

  • [ ] Entry has been added to changelog
  • [x] This PR does not make a user-facing change

Documentation

  • [ ] Docs have been updated
  • [x] This change does not need a documentation update

Dark mode

  • [ ] The UI has been tested both in dark and light mode
  • [x] This PR does not change the UI

RobertJoonas avatar Jun 17 '24 11:06 RobertJoonas