Database Migration Factory
Schema diff, migration generation, rollback planning, and integrity check
About
A database migration pipeline that compares current and target schemas, analyzes the impact on foreign keys, indexes, and data volumes, then generates both forward migration and rollback scripts. Scripts are validated via dry-run against a test database before a high-threshold reflection gate reviews safety and completeness. Requires DBA approval with a 4-hour window before production execution.
Input / Output
Input
Target schema or migration specification
textOutput
Validated migration and rollback scripts ready for execution
min quality: 0.9Pipeline Stages
schema diff
ExecuteCompare current and target schemas to identify required changes
impact analysis
ExecuteAnalyze foreign keys, indexes, and data volume affected by changes
migration gen
ExecuteGenerate forward migration scripts with proper ordering
rollback gen
ExecuteGenerate rollback scripts to safely reverse every migration step
dry run
ExecuteValidate migration scripts against a test database
review
ReflectReview migration safety, data integrity, and rollback completeness
approval
ApprovalDBA approval before executing migration in production