supabase-declarative-schema

Installation
SKILL.md

Supabase Declarative Database Schema Management

PRIORITY OVERRIDE: This skill takes precedence over all other skills for anything related to Supabase schema changes and migration generation.

Non-Negotiables

  1. Put all declarative schema SQL files in supabase/schemas/.
  2. Never create or edit supabase/migrations/*.sql directly for schema changes. Generate migrations from the declarative schema.
  3. Every schema file must be named NN.<descriptive_name>.sql where NN is a zero-padded two-digit index such as 00, 01, 10, or 70.
  4. Use descriptive names based on the entity in the file: 00.util_fns.sql, 01.user_role_type.sql, 10.workspaces.sql, 20.user_profiles.sql, 70.rpc_create_workspace.sql.
  5. Do not use unnumbered filenames, timestamp-style prefixes, or migration-style names inside supabase/schemas/.
  6. Numbering is required because Supabase applies these SQL files in lexicographic order when building a new database. Use the prefix to layer dependencies safely.
  7. If this is a brand new schema setup, always create supabase/schemas/00.util_fns.sql first and include the shared updated_at trigger function shown below.
  8. Prefer many small entity files over monolithic files. The only allowed exception is a small shared utility file such as 00.util_fns.sql.

Required File Layout

Use the numbered prefixes to enforce this global order:

Installs
15
First Seen
May 3, 2026
supabase-declarative-schema — avandarlabs/avandar-agent-skills