database-design
Installation
SKILL.md
Database design
Design the schema as the domain's record, with the database holding its own invariants rather than trusting the code that writes to it.
Before designing
- Where the schema doc and the DDL or code that enforces it differ, the code wins and the doc is fixed in the same change.
- Find how this repo changes its schema: forward-only migrations, or derived tables rebuilt from their sources. Never mix the two for one table.
- Search the repo's history and past sessions for schema corrections, and treat a repeated fix as a requirement.