database-migration
Use when changing review re-RAG schema, repositories, migrations, or PostgreSQL integration behavior.
SKILL.md.claude/skills/database-migration/SKILL.md
GitHubDatabase Migration
Follow AGENTS.md first.
Workflow
- Inspect
pubtator_link/db/review_schema.sql, existing migrations, and repository tests before editing schema code. - Make migrations idempotent and keep bootstrap schema and migrations consistent.
- Keep SQL mapping logic in repository/mappers, not API or MCP layers.
- Add or update unit tests for schema text, migration ordering, mapper behavior, and repository edge cases.
- Add PostgreSQL integration coverage when the behavior depends on database semantics that unit tests cannot prove.
- Run focused database tests, then
make ci-localbefore handoff.