Skip to content

feat: apply PostgreSQL migration to Supabase — Phase 1 complete#9

Merged
brucelikeeat merged 2 commits into
mainfrom
cursor/complete-postgres-migration-2f13
May 30, 2026
Merged

feat: apply PostgreSQL migration to Supabase — Phase 1 complete#9
brucelikeeat merged 2 commits into
mainfrom
cursor/complete-postgres-migration-2f13

Conversation

@brucelikeeat

Copy link
Copy Markdown
Owner

Phase 1 Steps 1.4 + 1.5 — Now Complete

What changed

prisma/migrations/

  • Removed old SQLite migration history (20260326051942_init)
  • Created new PostgreSQL migration: 20260530210226_init_postgres/migration.sql
  • Migration applied successfully to Supabase

docs/launch-log.md

  • Steps 1.4 and 1.5 updated from ⚠️ blocked → ✅ done
  • Added connection details and migration notes

Migration details

All 4 NextAuth tables created in Supabase PostgreSQL:

Table Key types
Account refresh_token, access_token, id_tokenTEXT (from @db.Text)
Session expiresTIMESTAMP(3)
User emailVerifiedTIMESTAMP(3), selectedGithubRepoTEXT
VerificationToken expiresTIMESTAMP(3), both unique indexes

Connection string note

The Supabase direct connection (db.tziipxidkvyijwwvqrdl.supabase.co:5432) is not IPv4 compatible without an add-on. The session pooler (aws-1-us-east-2.pooler.supabase.com:5432) was used for DIRECT_URL instead — this works correctly for Prisma migrations and is IPv4 compatible.

  • DATABASE_URL → transaction pooler, port 6543 (?pgbouncer=true)
  • DIRECT_URL → session pooler, port 5432 (same host, no pgbouncer flag)

Build

npx next build — ✅ passes cleanly post-migration.

Open in Web Open in Cursor 

cursoragent and others added 2 commits May 30, 2026 21:03
- Remove old SQLite migration history (20260326051942_init)
- Create new PostgreSQL migration (20260530210226_init_postgres)
  - All 4 NextAuth tables: Account, Session, User, VerificationToken
  - refresh_token, access_token, id_token correctly typed as TEXT
  - All unique indexes and foreign keys applied
- DATABASE_URL: transaction pooler (port 6543, IPv4 compatible)
- DIRECT_URL: session pooler (port 5432, IPv4 compatible)
  - Note: direct connection not used — not IPv4 compatible without add-on
- Update docs/launch-log.md: steps 1.4 and 1.5 marked done

Co-authored-by: brucelikeeat <brucelikeeat@users.noreply.github.com>
Co-authored-by: brucelikeeat <brucelikeeat@users.noreply.github.com>
@brucelikeeat brucelikeeat merged commit 5f76a19 into main May 30, 2026
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