database-patterns
Pass
Audited by Gen Agent Trust Hub on Feb 27, 2026
Risk Level: SAFECOMMAND_EXECUTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/detect-model-changes.pyutility uses thesubprocessmodule to executegitandalembiccommands. These commands are used to identify recent changes to model files and determine the current database migration revision to provide context for the user. - [COMMAND_EXECUTION]: The
scripts/create-migration.mdfile defines a template that uses shell command interpolation (e.g.,!date,!alembic current, and!git diff) to automatically populate migration metadata. These commands are executed locally to assist the developer in creating consistent database migrations. - [EXTERNAL_DOWNLOADS]: The documentation in
rules/migration-rollback.mdrecommends the installation ofpgroll, a well-known tool for zero-downtime migrations, via the Homebrew package manager.
Audit Metadata