Skip to content

Run Analytics on native PostgreSQL (#5) - #6

Merged
AoLiGei1221 merged 2 commits into
mainfrom
codex/5-native-postgres-analytics
Aug 27, 2026
Merged

Run Analytics on native PostgreSQL (#5)#6
AoLiGei1221 merged 2 commits into
mainfrom
codex/5-native-postgres-analytics

Conversation

@AoLiGei1221

Copy link
Copy Markdown
Contributor

Closes #5

What changed

  • replace the Analytics time_bucket() query with PostgreSQL 15 date_bin() using a fixed UTC Monday origin
  • preserve the existing API, filters, ordering, and hour/day/week output formats
  • add a seven-event PostgreSQL 15.13 fixture covering the ISO week boundary and empty results
  • require that fixture in CI

Verification

  • pnpm --filter @humanly/backend test:analytics-postgres
  • pnpm --filter @humanly/shared build
  • pnpm --filter @humanly/backend build
  • pnpm test:audit
  • built backend contains date_bin and no time_bucket

This PR does not change legacy migrations or the database Compose image.

@AoLiGei1221
AoLiGei1221 merged commit f749aa4 into main Aug 27, 2026
14 checks passed
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.

Remove the production Analytics dependency on TimescaleDB

1 participant