feat: apply PostgreSQL migration to Supabase — Phase 1 complete#9
Merged
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 Steps 1.4 + 1.5 — Now Complete
What changed
prisma/migrations/20260326051942_init)20260530210226_init_postgres/migration.sqldocs/launch-log.mdMigration details
All 4 NextAuth tables created in Supabase PostgreSQL:
Accountrefresh_token,access_token,id_token→TEXT(from@db.Text)Sessionexpires→TIMESTAMP(3)UseremailVerified→TIMESTAMP(3),selectedGithubRepo→TEXTVerificationTokenexpires→TIMESTAMP(3), both unique indexesConnection 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 forDIRECT_URLinstead — 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.