Problem
On first run, ./bin/start.sh reports [WARN] Schema push had issues (may be fine on first run) and all database schemas end up with no tables. This causes relation "User" does not exist errors when trying to register or log in.
Root Cause
The Prisma schema defines a directUrl for non-pooled connections:
datasource db {
url = env("DATABASE_URL")
directUrl = env("DATABASE_URL_UNPOOLED")
}
The directUrl field is required for production deployments behind connection poolers (PgBouncer/Supabase). However, Prisma validates that DATABASE_URL_UNPOOLED exists before running any command, even locally where there's no pooler.
The following scripts only set DATABASE_URL, causing prisma db push to fail silently:
bin/start.sh (line 689)
bin/db-setup.sh
bin/setup-db-simple.sh
Fix
Set DATABASE_URL_UNPOOLED="$UNIFIED_DB_URL" alongside DATABASE_URL in all prisma db push invocations. For local dev, both values are identical.
Problem
On first run,
./bin/start.shreports[WARN] Schema push had issues (may be fine on first run)and all database schemas end up with no tables. This causesrelation "User" does not existerrors when trying to register or log in.Root Cause
The Prisma schema defines a
directUrlfor non-pooled connections:The
directUrlfield is required for production deployments behind connection poolers (PgBouncer/Supabase). However, Prisma validates thatDATABASE_URL_UNPOOLEDexists before running any command, even locally where there's no pooler.The following scripts only set
DATABASE_URL, causingprisma db pushto fail silently:bin/start.sh(line 689)bin/db-setup.shbin/setup-db-simple.shFix
Set
DATABASE_URL_UNPOOLED="$UNIFIED_DB_URL"alongsideDATABASE_URLin all prisma db push invocations. For local dev, both values are identical.