fix(db): create pg_net in extensions schema for clean replay#357
fix(db): create pg_net in extensions schema for clean replay#357glassBead-tc wants to merge 1 commit into
Conversation
Migration 20260408033928 created pg_net with no target schema. On a fresh database (CI `supabase start` replay), where pg_net is not pre-provisioned, `CREATE EXTENSION IF NOT EXISTS pg_net` fails with 3F000 "no schema has been selected to create in" — breaking the Schema Drift Check and Test Suite on every migration PR. Pin it to the extensions schema, matching the convention already used in 20260409232440. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Greptile SummaryPins
Confidence Score: 5/5Safe to merge — the change is a single-line addition that fixes CI on fresh replays without altering end-state schema. The edit adds No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant CI as CI (supabase start)
participant PG as PostgreSQL
participant NET as pg_net (net schema)
Note over CI,PG: Fresh replay — pgmq & pg_cron pre-provisioned, pg_net is NOT
CI->>PG: 20260408033928 migration
Note over PG: Before fix: CREATE EXTENSION IF NOT EXISTS pg_net
PG-->>CI: ERROR 3F000: no schema selected
Note over PG: After fix: CREATE EXTENSION IF NOT EXISTS pg_net WITH SCHEMA extensions
PG->>NET: Extension registered under extensions schema
Note over NET: Functional objects still created in net schema
PG-->>CI: OK
CI->>PG: invoke_process_thought_queue_from_vault(...)
PG->>NET: net.http_post(...) — resolves via search_path / explicit qualifier
NET-->>PG: HTTP request ID (bigint)
PG-->>CI: OK
Reviews (1): Last reviewed commit: "fix(db): create pg_net in extensions sch..." | Re-trigger Greptile |
|
Superseded by #359, which includes this pg_net fix plus the full Test Suite repair. main is green. |
Problem
Migration
20260408033928_add_hub_tables_vectors_pgmq_realtime.sqlcreatedpg_netwith no target schema:On a fresh database — the CI
supabase startreplay —pgmqandpg_cronare pre-provisioned by Supabase's local stack, butpg_netis not. Sopg_nettakes the realCREATE EXTENSIONpath and fails:This breaks Schema Drift Check and Test Suite on every migration PR.
Fix
Pin
pg_netto theextensionsschema, matching the convention already used later in20260409232440_remote_schema.sql(create extension if not exists "pg_net" with schema "extensions"). The end-state schema is unchanged, so no drift is introduced.Scoped to
pg_netonly —pgmqandpg_cronare left as-is because they install into their own expected schemas and do not hit the failing path.Verification
db pushdoes not re-apply the existing version to staging/prod.🤖 Generated with Claude Code