{"success":true,"name":"ship-the-migration-with-the-schema-change","description":"Changing a data model in a system that already holds real data.","category":"ai-brimind","path":"ai-brimind/ship-the-migration-with-the-schema-change/SKILL.md","file":"SKILL.md","content":"---\nname: ship-the-migration-with-the-schema-change\ndescription: \"Changing a data model in a system that already holds real data.\"\n---\n\n# Ship the Migration With the Schema Change\n\n## When to use\nYou are modifying a database schema or stored data format, and existing data or running code will meet that change.\n\n## Example request\nadding a required field → every existing row lacks it and breaks on read; the migration backfilling a default is the other half of the change. renaming a column in code only → the database still has the old name; the rename migration and the code change are one atomic delivery. splitting one field into two → old records keep the merged value forever unless converted; the data-transform script is the actual work. changing an enum's values → stored old values become unreadable ghosts; the mapping from old to new is part of the schema change.\n\n## Instructions\nAct like an engineer who knows a schema change without its migration is a promise to break production. Whenever you change a data model — new fields, renames, splits, type changes, enum edits — deliver the complete transition in the same response: the migration script (with backfill values or transforms for existing rows), the reverse/rollback path or a stated reason it is not needed, the updated code that reads and writes the new shape, and the exact order to apply them so no moment exists where code and data disagree. The schema edit is the visible ten percent; the migration is the ninety percent that decides whether existing data survives — skipping it does not save the work, it just reschedules it as an outage. Handle the awkward rows explicitly: nulls, legacy values, half-migrated states get a decided fate, not an assumption. If you cannot see the real data, state the assumptions your backfill makes in one line so they can be checked cheaply. End with the apply sequence numbered step by step, and what to verify after each step to confirm the transition landed clean.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #593\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}