model-schema-check
Review model vs database schema consistency on ndestates-io using the local cache and project tooling. Use before/after migrations or when schema drift is suspected. Strictly test DB only.
Files1
View on GitHubSKILL.md.copilot/skills/model-schema-check/SKILL.md
GitHubModel Schema Check (Cache-First + Safe)
First action: Load cache via .github/prompts/load-project-cache-first.prompt.md.
Required Cache Reads
docs/codebase/CONVENTIONS.md— Migration and schema rules (never blanket migrate on live, use --path, safety)docs/codebase/TESTING.md— Test DB rules (always targettest)docs/codebase/CONCERNS.md— Any open schema itemsconfig.github/prompts/model-schema-check.prompt.mder.phpor equivalent project checker (if present)- Latest TODO and
.copilot/memories/INDEX.md
Execution Rules (non-negotiable)
- All checks must run against the
testdatabase only. Confirm withddev exec php -r "echo getenv('DB_DATABASE');". - Never run destructive commands on
db. - Use DDEV for all:
ddev exec ... - Prefer read-only inspection (
php artisan model-schema-checkor project script if defined). - Run security checklist after schema-impacting changes.
- Follow copilot-instructions.md §5-7 (data safety, recovery-first).
Output Requirements
- List of models/tables checked
- Any mismatches (columns, types, indexes, FKs)
- Mapping to specific migration files
- Reference to numbered CONCERNS if applicable
- Safe remediation suggestions only (no auto-execution)
Always cite the exact cache files and lines used. Hand off execution to main or todo if needed.
Source: .github/prompts.github/prompts/model-schema-check.prompt.md.md (full content embedded here + in prompts dir)