kernel-dev-database
Installation
SKILL.md
Production Database Change Protocol
Use PostgreSQL as the persistence source of truth, Goose as the only schema-change mechanism, and generated Kysely types as a checked-in consumer contract. Read the focused references below before acting; do not improvise a production migration from a DDL snippet alone. When working in the Hominem monorepo, use the Hominem-specific references and script without weakening the general safety gates.
Non-negotiables
- Never apply schema DDL through ad hoc
psql, a GUI, or a manual production session. - Never edit a migration that has run in a durable environment.
- Never hand-edit generated database types.
- Never use
CASCADEuntil every dependent object and data impact is enumerated. - Never run a long or resumable backfill as an unbounded Goose DDL migration.
- Never assume
Downis a safe production rollback after data has changed. - Never deploy code that requires a schema contract before the compatible migration phase is understood.