mirror of
https://github.com/supabase/agent-skills.git
synced 2026-03-27 10:09:26 +08:00
fix: correct pg_cron schema, API key types, and migration up docs
- pg_cron requires pg_catalog schema, not extensions (critical fix) - Add publishable/secret key types to Identifying Keys section - Fix Dashboard path to Settings > API Keys - Fix migration up comment: applies all pending, not single Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,7 @@ on conflict (id) do nothing;
|
|||||||
## Test Specific Migration
|
## Test Specific Migration
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Apply single pending migration
|
# Apply all pending migrations
|
||||||
supabase migration up
|
supabase migration up
|
||||||
|
|
||||||
# Check migration status
|
# Check migration status
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ create index idx_name_trgm on users
|
|||||||
-- Vector similarity search (AI embeddings)
|
-- Vector similarity search (AI embeddings)
|
||||||
create extension if not exists vector with schema extensions;
|
create extension if not exists vector with schema extensions;
|
||||||
|
|
||||||
-- Scheduled jobs
|
-- Scheduled jobs (pg_cron requires pg_catalog, not extensions)
|
||||||
create extension if not exists pg_cron with schema extensions;
|
create extension if not exists pg_cron with schema pg_catalog;
|
||||||
|
|
||||||
-- HTTP requests from database
|
-- HTTP requests from database
|
||||||
create extension if not exists pg_net with schema extensions;
|
create extension if not exists pg_net with schema extensions;
|
||||||
|
|||||||
@@ -58,14 +58,16 @@ SUPABASE_SERVICE_ROLE_KEY=eyJ... # NEVER prefix with NEXT_PUBLIC_
|
|||||||
|
|
||||||
## Identifying Keys
|
## Identifying Keys
|
||||||
|
|
||||||
- **Anon key**: `role` claim is `anon`
|
- **Anon key**: `role` claim is `anon` (legacy)
|
||||||
- **Service role key**: `role` claim is `service_role`
|
- **Service role key**: `role` claim is `service_role` (legacy)
|
||||||
|
- **Publishable key**: Safe to expose in client-side code (newer recommended approach)
|
||||||
|
- **Secret key**: Server-only, replaces service role key (newer recommended approach)
|
||||||
|
|
||||||
Decode JWT at [jwt.io](https://jwt.io) to verify.
|
Decode JWT at [jwt.io](https://jwt.io) to verify legacy keys.
|
||||||
|
|
||||||
## If Service Key is Exposed
|
## If Service Key is Exposed
|
||||||
|
|
||||||
1. Immediately rotate keys in Dashboard > Settings > API
|
1. Immediately rotate keys in Dashboard > Settings > API Keys
|
||||||
2. Review database for unauthorized changes
|
2. Review database for unauthorized changes
|
||||||
3. Check logs for suspicious activity
|
3. Check logs for suspicious activity
|
||||||
4. Update all backend services with new key
|
4. Update all backend services with new key
|
||||||
|
|||||||
Reference in New Issue
Block a user