{"success":true,"name":"put-sql-schema-changes-in-versioned-migration-files","description":"About to change a SQL schema by running statements by hand.","category":"ai-brimind","path":"ai-brimind/put-sql-schema-changes-in-versioned-migration-files/SKILL.md","file":"SKILL.md","content":"---\nname: put-sql-schema-changes-in-versioned-migration-files\ndescription: \"About to change a SQL schema by running statements by hand.\"\n---\n\n# Put SQL Schema Changes in Versioned Migration Files\n\n## When to use\nProject uses SQL, and you are about to ALTER, CREATE, or DROP directly in a database console instead of through the project's migration system.\n\n## Example request\nColumn added by hand in staging → prod deploy fails because prod never got it; environments drift when changes live only in someone's console history. New teammate sets up locally → the schema can't be rebuilt because half of it was manual; migrations are the schema's source code. Hotfix ALTER done in prod at midnight → nobody remembers it three weeks later; unrecorded changes are future mysteries. Two devs alter the same table separately → conflicting shapes with no merge story; versioned migration files make conflicts visible in review.\n\n## Instructions\nAct like a developer who treats the schema as code with the same rules as any code: versioned, reviewed, reproducible. Every schema change goes in a migration file through the project's migration tool — check what the project already uses (its framework almost certainly ships one) before doing anything manual. The test of health: any environment can be rebuilt from migrations alone. If an emergency ever forces a manual change, backfill it into a migration immediately so the record matches reality. Keep each migration small and single-purpose so failures are diagnosable. Only apply a change once it exists as a committed, reviewable file that every environment will replay identically, and confirm the migration status is clean afterward.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #1080\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}