Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration: Increase the precision of subscription timestamp fields #4236

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

RobertJoonas
Copy link
Contributor

@RobertJoonas RobertJoonas commented Jun 17, 2024

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

  • Automated tests have been added
  • This PR does not require tests

Changelog

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

Documentation

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

Dark mode

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

@RobertJoonas RobertJoonas force-pushed the migration-paddle-webhook-handling branch from bcbc1f1 to 4045a03 Compare June 17, 2024 12:01
@zoldar zoldar added deploy-to-staging Special label that triggers a deploy to a staging environment preview and removed preview deploy-to-staging Special label that triggers a deploy to a staging environment labels Jun 17, 2024
Copy link
Contributor

@zoldar zoldar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrated on staging, everything seems to work fine afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-to-staging Special label that triggers a deploy to a staging environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants