Some checks failed
Deploy to Cloudflare Workers / deploy (push) Has been cancelled
49 lines
1.3 KiB
Markdown
49 lines
1.3 KiB
Markdown
# Fixing IPv6 / `db push` connection errors
|
||
|
||
If you see:
|
||
|
||
```
|
||
IPv6 is not supported on your current network
|
||
Run supabase link --project-ref vcxpcyafnlyiyqmapyyy to setup IPv4 connection.
|
||
```
|
||
|
||
Your network cannot reach Supabase’s **direct** database host (`db.*.supabase.co`, IPv6). Use the **Session pooler** (IPv4) instead.
|
||
|
||
## Option A — Link once (recommended)
|
||
|
||
```bash
|
||
npm run db:link
|
||
# Enter your database password when prompted
|
||
npm run db:push
|
||
```
|
||
|
||
Or with password in `.env.local`:
|
||
|
||
```bash
|
||
# Add: SUPABASE_DB_PASSWORD=your-database-password
|
||
npm run db:link
|
||
npm run db:push
|
||
```
|
||
|
||
## Option B — Push with pooler URL (no link)
|
||
|
||
1. Dashboard → **Connect** → **Session mode** (port **5432**)
|
||
2. Copy the connection string (host looks like `aws-0-….pooler.supabase.com`)
|
||
3. Add to `.env.local`:
|
||
|
||
```env
|
||
SUPABASE_DB_URL=postgresql://postgres.vcxpcyafnlyiyqmapyyy:YOUR_PASSWORD@aws-0-YOUR_REGION.pooler.supabase.com:5432/postgres
|
||
```
|
||
|
||
4. Run:
|
||
|
||
```bash
|
||
npm run db:push:pooler
|
||
```
|
||
|
||
## Option C — SQL Editor (no CLI)
|
||
|
||
Run each file in `supabase/migrations/` in order in the [SQL Editor](https://supabase.com/dashboard/project/vcxpcyafnlyiyqmapyyy/sql).
|
||
|
||
Database password: **Project Settings → Database → Database password**.
|