plausible / analytics

Simple, open source, lightweight (< 1 KB) and privacy-friendly web analytics alternative to Google Analytics.
https://plausible.io
GNU Affero General Public License v3.0
19k stars 1.02k forks source link

Migration: Increase the precision of subscription timestamp fields #4236

Open RobertJoonas opened 2 weeks ago

RobertJoonas commented 2 weeks ago

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

Changelog

Documentation

Dark mode