Skip to content

Conversation

@koxudaxi
Copy link
Collaborator

@koxudaxi koxudaxi commented Dec 26, 2025

TL;DR

Update all timestamp columns in the database to use timezone information.

What changed?

This PR modifies all timestamp columns across database tables to use timestamp with time zone data type instead of the default timestamp without timezone. It also ensures that timestamp columns have a default value of now() where appropriate.

The changes affect the following tables:

  • api_keys
  • environments
  • sessions
  • users
  • organizations
  • organization_memberships
  • organization_membership_audit
  • projects
  • project_memberships
  • project_membership_audit
  • traces
  • spans

How to test?

  1. Run database migrations to apply these changes
  2. Verify that existing timestamps are correctly converted
  3. Create new records and confirm that timestamps are stored with timezone information
  4. Check that timezone-aware queries work correctly with the updated schema

Why make this change?

Using timezone-aware timestamps ensures consistent time handling across different environments and regions. This prevents issues with time calculations and comparisons that can occur when timestamps lack timezone information, especially in a distributed system where users or services may be in different timezones.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 26, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
v2-docs d426fdc Dec 26 2025, 08:13 AM

@koxudaxi koxudaxi marked this pull request as ready for review December 26, 2025 08:08
@koxudaxi koxudaxi requested a review from willbakst as a code owner December 26, 2025 08:08
Copy link
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants