Run mutating SQL (INSERT, UPDATE, DELETE, DDL) against Supabase databases. Requires explicit user invocation. Use for migrations, seed data, schema changes, or data fixes.
cat packages/python/cli/databases.ymlpnpm db status 2>&1 | head -10The query tool lives at ${CLAUDE_SKILL_DIR}/../db/scripts/query.ts. Run it with:
node --experimental-strip-types ${CLAUDE_SKILL_DIR}/../db/scripts/query.ts [flags] "<sql>"Flags:
--env local|dev|preview|prod (default: local)--db core|admin (default: core)--format table|json|csv (default: table)Note: do NOT pass --readonly. This skill is for mutations.
Same as /db. See that skill for credential resolution order and SSM instructions.
Generated Supabase types with full table schemas, enums, and function signatures:
packages/typescript/databases/core/database.types.tspackages/typescript/databases/admin/database.types.tsRead the relevant file when you need column names, types, enums, or relationships.
--env local unless the user specifies otherwise.pnpm db diff --execute for tracked migrations. Only use raw DDL for local experimentation.Run the user's mutation. Always show the SQL and target before executing. For remote envs, require explicit confirmation.
$ARGUMENTS