Commit 06a1533
feat: schema auto-apply falls back to DATABASE_URL when no access token
Previously auto-schema required SUPABASE_ACCESS_TOKEN (from npx supabase
login). Now it tries three methods in order:
1. Management API (SUPABASE_ACCESS_TOKEN) — no extra credentials
2. Direct Postgres connection (DATABASE_URL) — user copies from Connect panel
3. Interactive prompt for DATABASE_URL (TTY only)
4. Manual SQL paste instructions (last resort)
This eliminates the hidden fourth dependency. Users only need:
- Supabase URL + service role key (for the MCP server)
- DATABASE_URL (for schema setup — same dashboard, Connect panel)
- OpenRouter API key (for embeddings)
Uses the pg package (already a dependency) for direct DDL execution.
Resolves GIT-45 concern #1 (SUPABASE_ACCESS_TOKEN hidden dependency).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1df260b commit 06a1533
2 files changed
Lines changed: 85 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 12 | + | |
21 | 13 | | |
22 | 14 | | |
23 | 15 | | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
27 | 19 | | |
| 20 | + | |
28 | 21 | | |
29 | 22 | | |
30 | 23 | | |
31 | 24 | | |
32 | 25 | | |
33 | 26 | | |
| 27 | + | |
34 | 28 | | |
35 | 29 | | |
36 | 30 | | |
| |||
197 | 191 | | |
198 | 192 | | |
199 | 193 | | |
200 | | - | |
| 194 | + | |
201 | 195 | | |
202 | 196 | | |
203 | | - | |
204 | | - | |
205 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
206 | 200 | | |
207 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
208 | 204 | | |
209 | | - | |
| 205 | + | |
210 | 206 | | |
211 | 207 | | |
| 208 | + | |
212 | 209 | | |
213 | 210 | | |
214 | | - | |
215 | | - | |
216 | 211 | | |
217 | 212 | | |
218 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
183 | 211 | | |
184 | 212 | | |
185 | 213 | | |
| |||
397 | 425 | | |
398 | 426 | | |
399 | 427 | | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
411 | 473 | | |
412 | 474 | | |
413 | 475 | | |
| |||
0 commit comments