feat: migrate Prisma datasource from SQLite to Supabase PostgreSQL (Phase 1)#6
Merged
Merged
Conversation
- Change datasource provider to 'postgresql' with directUrl support - Add @db.Text to Account.refresh_token, access_token, id_token - Update .env.example with PostgreSQL URL format and DIRECT_URL entry - Create docs/launch-log.md with Phase 1 status and agent log 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 — Database Migration: SQLite → Supabase PostgreSQL
What this PR does
Migrates the Prisma datasource from SQLite to Supabase PostgreSQL and creates the project launch log.
Changes
prisma/schema.prismasqlite→postgresql;directUrl = env("DIRECT_URL")added;Account.refresh_token,access_token,id_tokenannotated@db.Text.env.exampleDIRECT_URLentrydocs/launch-log.mdSchema audit results
Account.refresh_token→@db.Text— OAuth refresh tokens exceed varchar(191)Account.access_token→@db.Text— GitHub OAuth tokens can exceed 191 charsAccount.id_token→@db.Text— OIDC JWTs are longDateTimefields use properDateTimetype (no string defaults) ✅Boolean-as-Intpatterns found ✅Steps status
.envwas absent, created with placeholders.envAction required before merging
The
.envfile was not present in this environment. It has been created locally (gitignored) with placeholder values. You must fill in your real Supabase connection strings:Then run:
Build verification
npx prisma generate— ✅ Prisma Client v5.22.0 generated from updated schemanpx next build— ✅ all 16 routes compiled, zero Prisma-related errorsNon-Prisma issues found (not fixed per instructions):
[ENV CHECK]debug log fires at build time/api/debug-sessionroute still exists (worklog says it was removed but it remains)