mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[PR #5283] [MERGED] chore: migrate to @db.Timestamptz(3) and remove luxon dependency #5137
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#5137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/5283
Author: @mirarifhasan
Created: 7/28/2025
Status: ✅ Merged
Merged: 7/28/2025
Merged by: @mirarifhasan
Base:
next← Head:fix/timezone-compatibility📝 Commits (6)
79e31a0feat: remove deprecated env syncc697ccdfeat: using infraConfig in bootstrapc1a4464chore: migrate to TIMESTAMPTZ and remove luxon dependencyb80e1c8chore: remove luxon deps2cc28d8Revert "feat: using infraConfig in bootstrap"7ae7334chore: cleanup📊 Changes
13 files changed (+128 additions, -89 deletions)
View changed files
📝
packages/hoppscotch-backend/package.json(+0 -2)➕
packages/hoppscotch-backend/prisma/migrations/20250725154928_timestamp_with_timezone/migration.sql(+53 -0)📝
packages/hoppscotch-backend/prisma/migrations/migration_lock.toml(+2 -2)📝
packages/hoppscotch-backend/prisma/schema.prisma(+27 -27)📝
packages/hoppscotch-backend/src/auth/auth.service.ts(+11 -11)📝
packages/hoppscotch-backend/src/auth/helper.ts(+13 -14)📝
packages/hoppscotch-backend/src/auth/strategies/microsoft.strategy.ts(+1 -6)📝
packages/hoppscotch-backend/src/guards/infra-token.guard.ts(+2 -3)📝
packages/hoppscotch-backend/src/guards/rest-pat-auth.guard.ts(+13 -6)📝
packages/hoppscotch-backend/src/mailer/templates/team-invitation.hbs(+1 -1)📝
packages/hoppscotch-backend/src/mailer/templates/user-invitation.hbs(+1 -1)📝
packages/hoppscotch-backend/src/utils.ts(+4 -4)📝
pnpm-lock.yaml(+0 -12)📄 Description
Closes #4184
Close SHBE-552
What's changed
This PR includes the following changes:
Migrated timestamp columns in the PostgreSQL schema to use
@db.Timestamptz(3)for consistent timezone-aware datetime handling with millisecond precision.Removed
luxonfrom the codebase as it's no longer needed for date manipulation or formatting.Replaced all
luxonusage with native JavaScriptDate(i.e.,new Date()), ensuring proper UTC handling across the application.Why this change?
Standardizes timestamp storage to UTC using timestamptz, avoiding timezone-related bugs and improving cross-region consistency (i.e., Database hosted in one region and Backend application hosted in another region).
Simplifies the codebase by removing unnecessary dependencies.
Aligns with best practices for storing and comparing datetime values in PostgreSQL.
Notes to reviewers
Before merge:
next🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.