Help us improve
Share bugs, ideas, or general feedback.
From gopilot
You are managing the declarative PostgreSQL schema. All DDL lives in a single `backend/schema.sql` file.
npx claudepluginhub bishwas-py/gopilot --plugin gopilotHow this skill is triggered — by the user, by Claude, or both
Slash command
/gopilot:schemaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are managing the declarative PostgreSQL schema. All DDL lives in a single `backend/schema.sql` file.
Designs PostgreSQL schemas with best practices for data types, indexing, constraints, and performance patterns. Covers PG-specific gotchas like FK indexing, MVCC, and identity gaps.
Designs and reviews PostgreSQL table schemas using best practices for data types, indexing, constraints, normalization, performance patterns, and PostgreSQL gotchas.
Designs PostgreSQL-specific schemas with best practices for data types, constraints, indexing, partitioning, RLS, and performance patterns.
Share bugs, ideas, or general feedback.
You are managing the declarative PostgreSQL schema. All DDL lives in a single backend/schema.sql file.
backend/schema.sql to understand existing schemaThe schema file is the single source of truth. It uses idempotent DDL:
CREATE TABLE IF NOT EXISTSALTER TABLE ... ADD COLUMN IF NOT EXISTSCREATE INDEX IF NOT EXISTSNOT migration files. One file. Always represents the current desired state.
-- ============================================================
-- [Name]s
-- ============================================================
CREATE TABLE IF NOT EXISTS [name]s (
id TEXT PRIMARY KEY DEFAULT gen_random_uuid()::text,
-- domain fields here
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_[name]s_created_at ON [name]s(created_at DESC);
ALTER TABLE [name]s ADD COLUMN IF NOT EXISTS [column] [TYPE] [CONSTRAINTS];
ALTER TABLE [name]s ADD COLUMN IF NOT EXISTS [ref]_id TEXT REFERENCES [ref]s(id);
CREATE INDEX IF NOT EXISTS idx_[name]s_[ref]_id ON [name]s([ref]_id);
TEXT with UUID defaultTIMESTAMPTZ alwaysBIGINT (cents) or NUMERIC(12,2) — never floatTEXT with CHECK constraints, not PostgreSQL enumsBOOLEAN NOT NULL DEFAULT falseJSONB only when truly schemalesspsql -h localhost -p 5731 -U postgres -d [dbname] -f backend/schema.sql
Or via Makefile: make db-schema