Migration architect

Zero-downtime migration planning, compatibility validation, and rollback strategy generation.

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/migration-architect, including the files SKILL.md points to.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit alirezarezvani/claude-skills/engineering/skills/migration-architect#main ~/.claude/skills/migration-architect

For one project only, change the path to .claude/skills/migration-architect. This skill also uses migration_spec.json, migration_plan.json, compatibility.json, migration_planner.py, compatibility_checker.py, rollback_generator.py — copying SKILL.md alone won't be enough. See the folder on GitHub.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of Migration architect

Show the full text429 lines
namedescription
migration-architectZero-downtime migration planning, compatibility validation, and rollback strategy generation. Tools for system, database, and infrastructure migrations with minimal business impact. Use when planning a database migration, infrastructure cutover, system replacement, or any high-risk transition that needs explicit rollback paths.

Migration Architect

Tier: POWERFUL
Category: Engineering - Migration Strategy
Purpose: Zero-downtime migration planning, compatibility validation, and rollback strategy generation

Overview

The Migration Architect skill provides comprehensive tools and methodologies for planning, executing, and validating complex system migrations with minimal business impact. This skill combines proven migration patterns with automated planning tools to ensure successful transitions between systems, databases, and infrastructure.

Core Capabilities

1. Migration Strategy Planning
  • Phased Migration Planning: Break complex migrations into manageable phases with clear validation gates
  • Risk Assessment: Identify potential failure points and mitigation strategies before execution
  • Timeline Estimation: Generate realistic timelines based on migration complexity and resource constraints
  • Stakeholder Communication: Create communication templates and progress dashboards
2. Compatibility Analysis
  • Schema Evolution: Analyze database schema changes for backward compatibility issues
  • API Versioning: Detect breaking changes in REST/GraphQL APIs and microservice interfaces
  • Data Type Validation: Identify data format mismatches and conversion requirements
  • Constraint Analysis: Validate referential integrity and business rule changes
3. Rollback Strategy Generation
  • Automated Rollback Plans: Generate comprehensive rollback procedures for each migration phase
  • Data Recovery Scripts: Create point-in-time data restoration procedures
  • Service Rollback: Plan service version rollbacks with traffic management
  • Validation Checkpoints: Define success criteria and rollback triggers

Quick Start — plan → check compatibility → generate rollback

All paths relative to this skill folder; sample inputs in assets/, expected shapes in expected_outputs/.

# 1. Generate the migration plan from a spec (copy assets/sample_database_migration.json)
python3 scripts/migration_planner.py --input migration_spec.json --format json -o migration_plan.json

# 2. Check schema/API compatibility — exits non-zero unless fully compatible (CI gate)
python3 scripts/compatibility_checker.py --before assets/database_schema_before.json --after assets/database_schema_after.json --type database --format json -o compatibility.json

# 3. Generate the rollback runbook from the plan
python3 scripts/rollback_generator.py --input migration_plan.json --format both -o rollback_runbook

Outputs chain: migration_plan.json (phases, risks, estimated_duration_hours) feeds step 3; compatibility.json reports overall_compatibility plus breaking_changes_count / potentially_breaking_count.

Gate: the migration is not approved until (a) compatibility_checker exits 0 (overall_compatibility: compatible) or every breaking/potentially-breaking item is explicitly accepted by the owner in writing, and (b) a rollback runbook exists for every phase in the plan. Re-run both checks after any schema revision.

Migration Patterns

Database Migrations
Schema Evolution Patterns
  1. Expand-Contract Pattern

    • Expand: Add new columns/tables alongside existing schema
    • Dual Write: Application writes to both old and new schema
    • Migration: Backfill historical data to new schema
    • Contract: Remove old columns/tables after validation
  2. Parallel Schema Pattern

    • Run new schema in parallel with existing schema
    • Use feature flags to route traffic between schemas
    • Validate data consistency between parallel systems
    • Cutover when confidence is high
  3. Event Sourcing Migration

    • Capture all changes as events during migration window
    • Apply events to new schema for consistency
    • Enable replay capability for rollback scenarios
Data Migration Strategies
  1. Bulk Data Migration

    • Snapshot Approach: Full data copy during maintenance window
    • Incremental Sync: Continuous data synchronization with change tracking
    • Stream Processing: Real-time data transformation pipelines
  2. Dual-Write Pattern

    • Write to both source and target systems during migration
    • Implement compensation patterns for write failures
    • Use distributed transactions where consistency is critical
  3. Change Data Capture (CDC)

    • Stream database changes to target system
    • Maintain eventual consistency during migration
    • Enable zero-downtime migrations for large datasets
Service Migrations
Strangler Fig Pattern
  1. Intercept Requests: Route traffic through proxy/gateway
  2. Gradually Replace: Implement new service functionality incrementally
  3. Legacy Retirement: Remove old service components as new ones prove stable
  4. Monitoring: Track performance and error rates throughout transition
graph TD
    A[Client Requests] --> B[API Gateway]
    B --> C{Route Decision}
    C -->|Legacy Path| D[Legacy Service]
    C -->|New Path| E[New Service]
    D --> F[Legacy Database]
    E --> G[New Database]
Parallel Run Pattern
  1. Dual Execution: Run both old and new services simultaneously
  2. Shadow Traffic: Route production traffic to both systems
  3. Result Comparison: Compare outputs to validate correctness
  4. Gradual Cutover: Shift traffic percentage based on confidence
Canary Deployment Pattern
  1. Limited Rollout: Deploy new service to small percentage of users
  2. Monitoring: Track key metrics (latency, errors, business KPIs)
  3. Gradual Increase: Increase traffic percentage as confidence grows
  4. Full Rollout: Complete migration once validation passes
Infrastructure Migrations
Cloud-to-Cloud Migration
  1. Assessment Phase

    • Inventory existing resources and dependencies
    • Map services to target cloud equivalents
    • Identify vendor-specific features requiring refactoring
  2. Pilot Migration

    • Migrate non-critical workloads first
    • Validate performance and cost models
    • Refine migration procedures
  3. Production Migration

    • Use infrastructure as code for consistency
    • Implement cross-cloud networking during transition
    • Maintain disaster recovery capabilities
On-Premises to Cloud Migration
  1. Lift and Shift

    • Minimal changes to existing applications
    • Quick migration with optimization later
    • Use cloud migration tools and services
  2. Re-architecture

    • Redesign applications for cloud-native patterns
    • Adopt microservices, containers, and serverless
    • Implement cloud security and scaling practices
  3. Hybrid Approach

    • Keep sensitive data on-premises
    • Migrate compute workloads to cloud
    • Implement secure connectivity between environments

Feature Flags for Migrations

Progressive Feature Rollout
# Example feature flag implementation
class MigrationFeatureFlag:
    def __init__(self, flag_name, rollout_percentage=0):
        self.flag_name = flag_name
        self.rollout_percentage = rollout_percentage
    
    def is_enabled_for_user(self, user_id):
        hash_value = hash(f"{self.flag_name}:{user_id}")
        return (hash_value % 100) < self.rollout_percentage
    
    def gradual_rollout(self, target_percentage, step_size=10):
        while self.rollout_percentage < target_percentage:
            self.rollout_percentage = min(
                self.rollout_percentage + step_size,
                target_percentage
            )
            yield self.rollout_percentage
Circuit Breaker Pattern

Implement automatic fallback to legacy systems when new systems show degraded performance:

class MigrationCircuitBreaker:
    def __init__(self, failure_threshold=5, timeout=60):
        self.failure_count = 0
        self.failure_threshold = failure_threshold
        self.timeout = timeout
        self.last_failure_time = None
        self.state = 'CLOSED'  # CLOSED, OPEN, HALF_OPEN
    
    def call_new_service(self, request):
        if self.state == 'OPEN':
            if self.should_attempt_reset():
                self.state = 'HALF_OPEN'
            else:
                return self.fallback_to_legacy(request)
        
        try:
            response = self.new_service.process(request)
            self.on_success()
            return response
        except Exception as e:
            self.on_failure()
            return self.fallback_to_legacy(request)

Data Validation and Reconciliation

Validation Strategies
  1. Row Count Validation

    • Compare record counts between source and target
    • Account for soft deletes and filtered records
    • Implement threshold-based alerting
  2. Checksums and Hashing

    • Generate checksums for critical data subsets
    • Compare hash values to detect data drift
    • Use sampling for large datasets
  3. Business Logic Validation

    • Run critical business queries on both systems
    • Compare aggregate results (sums, counts, averages)
    • Validate derived data and calculations
Reconciliation Patterns
  1. Delta Detection

    -- Example delta query for reconciliation
    SELECT 'missing_in_target' as issue_type, source_id
    FROM source_table s
    WHERE NOT EXISTS (
        SELECT 1 FROM target_table t 
        WHERE t.id = s.id
    )
    UNION ALL
    SELECT 'extra_in_target' as issue_type, target_id
    FROM target_table t
    WHERE NOT EXISTS (
        SELECT 1 FROM source_table s 
        WHERE s.id = t.id
    );
    
  2. Automated Correction

    • Implement data repair scripts for common issues
    • Use idempotent operations for safe re-execution
    • Log all correction actions for audit trails

Rollback Strategies

Database Rollback
  1. Schema Rollback

    • Maintain schema version control
    • Use backward-compatible migrations when possible
    • Keep rollback scripts for each migration step
  2. Data Rollback

    • Point-in-time recovery using database backups
    • Transaction log replay for precise rollback points
    • Maintain data snapshots at migration checkpoints
Service Rollback
  1. Blue-Green Deployment

    • Keep previous service version running during migration
    • Switch traffic back to blue environment if issues arise
    • Maintain parallel infrastructure during migration window
  2. Rolling Rollback

    • Gradually shift traffic back to previous version
    • Monitor system health during rollback process
    • Implement automated rollback triggers
Infrastructure Rollback
  1. Infrastructure as Code

    • Version control all infrastructure definitions
    • Maintain rollback terraform/CloudFormation templates
    • Test rollback procedures in staging environments
  2. Data Persistence

    • Preserve data in original location during migration
    • Implement data sync back to original systems
    • Maintain backup strategies across both environments

Risk Assessment Framework

Risk Categories
  1. Technical Risks

    • Data loss or corruption
    • Service downtime or degraded performance
    • Integration failures with dependent systems
    • Scalability issues under production load
  2. Business Risks

    • Revenue impact from service disruption
    • Customer experience degradation
    • Compliance and regulatory concerns
    • Brand reputation impact
  3. Operational Risks

    • Team knowledge gaps
    • Insufficient testing coverage
    • Inadequate monitoring and alerting
    • Communication breakdowns
Risk Mitigation Strategies
  1. Technical Mitigations

    • Comprehensive testing (unit, integration, load, chaos)
    • Gradual rollout with automated rollback triggers
    • Data validation and reconciliation processes
    • Performance monitoring and alerting
  2. Business Mitigations

    • Stakeholder communication plans
    • Business continuity procedures
    • Customer notification strategies
    • Revenue protection measures
  3. Operational Mitigations

    • Team training and documentation
    • Runbook creation and testing
    • On-call rotation planning
    • Post-migration review processes

Migration Runbooks

Pre-Migration Checklist
  • Migration plan reviewed and approved
  • Rollback procedures tested and validated
  • Monitoring and alerting configured
  • Team roles and responsibilities defined
  • Stakeholder communication plan activated
  • Backup and recovery procedures verified
  • Test environment validation complete
  • Performance benchmarks established
  • Security review completed
  • Compliance requirements verified
During Migration
  • Execute migration phases in planned order
  • Monitor key performance indicators continuously
  • Validate data consistency at each checkpoint
  • Communicate progress to stakeholders
  • Document any deviations from plan
  • Execute rollback if success criteria not met
  • Coordinate with dependent teams
  • Maintain detailed execution logs
Post-Migration
  • Validate all success criteria met
  • Perform comprehensive system health checks
  • Execute data reconciliation procedures
  • Monitor system performance over 72 hours
  • Update documentation and runbooks
  • Decommission legacy systems (if applicable)
  • Conduct post-migration retrospective
  • Archive migration artifacts
  • Update disaster recovery procedures

Tools and Technologies

Migration Planning Tools
  • migration_planner.py: Automated migration plan generation
  • compatibility_checker.py: Schema and API compatibility analysis
  • rollback_generator.py: Comprehensive rollback procedure generation
Validation Tools
  • Database comparison utilities (schema and data)
  • API contract testing frameworks
  • Performance benchmarking tools
  • Data quality validation pipelines
Monitoring and Alerting
  • Real-time migration progress dashboards
  • Automated rollback trigger systems
  • Business metric monitoring
  • Stakeholder notification systems

Best Practices

Planning Phase
  1. Start with Risk Assessment: Identify all potential failure modes before planning
  2. Design for Rollback: Every migration step should have a tested rollback procedure
  3. Validate in Staging: Execute full migration process in production-like environment
  4. Plan for Gradual Rollout: Use feature flags and traffic routing for controlled migration
Execution Phase
  1. Monitor Continuously: Track both technical and business metrics throughout
  2. Communicate Proactively: Keep all stakeholders informed of progress and issues
  3. Document Everything: Maintain detailed logs for post-migration analysis
  4. Stay Flexible: Be prepared to adjust timeline based on real-world performance
Validation Phase
  1. Automate Validation: Use automated tools for data consistency and performance checks
  2. Business Logic Testing: Validate critical business processes end-to-end
  3. Load Testing: Verify system performance under expected production load
  4. Security Validation: Ensure security controls function properly in new environment

Integration with Development Lifecycle

CI/CD Integration
# Example migration pipeline stage
migration_validation:
  stage: test
  script:
    - python scripts/compatibility_checker.py --before=old_schema.json --after=new_schema.json
    - python scripts/migration_planner.py --config=migration_config.json --validate
  artifacts:
    reports:
      - compatibility_report.json
      - migration_plan.json
Infrastructure as Code
# Example Terraform for blue-green infrastructure
resource "aws_instance" "blue_environment" {
  count = var.migration_phase == "preparation" ? var.instance_count : 0
  # Blue environment configuration
}

resource "aws_instance" "green_environment" {
  count = var.migration_phase == "execution" ? var.instance_count : 0
  # Green environment configuration
}

This Migration Architect skill provides a comprehensive framework for planning, executing, and validating complex system migrations while minimizing business impact and technical risk. The combination of automated tools, proven patterns, and detailed procedures enables organizations to confidently undertake even the most complex migration projects.

1---
2name: "migration-architect"
3description: "Zero-downtime migration planning, compatibility validation, and rollback strategy generation. Tools for system, database, and infrastructure migrations with minimal business impact. Use when planning a database migration, infrastructure cutover, system replacement, or any high-risk transition that needs explicit rollback paths."
4---
5 
6# Migration Architect
7 
8**Tier:** POWERFUL
9**Category:** Engineering - Migration Strategy
10**Purpose:** Zero-downtime migration planning, compatibility validation, and rollback strategy generation
11 
12## Overview
13 
14The Migration Architect skill provides comprehensive tools and methodologies for planning, executing, and validating complex system migrations with minimal business impact. This skill combines proven migration patterns with automated planning tools to ensure successful transitions between systems, databases, and infrastructure.
15 
16## Core Capabilities
17 
18### 1. Migration Strategy Planning
19- **Phased Migration Planning:** Break complex migrations into manageable phases with clear validation gates
20- **Risk Assessment:** Identify potential failure points and mitigation strategies before execution
21- **Timeline Estimation:** Generate realistic timelines based on migration complexity and resource constraints
22- **Stakeholder Communication:** Create communication templates and progress dashboards
23 
24### 2. Compatibility Analysis
25- **Schema Evolution:** Analyze database schema changes for backward compatibility issues
26- **API Versioning:** Detect breaking changes in REST/GraphQL APIs and microservice interfaces
27- **Data Type Validation:** Identify data format mismatches and conversion requirements
28- **Constraint Analysis:** Validate referential integrity and business rule changes
29 
30### 3. Rollback Strategy Generation
31- **Automated Rollback Plans:** Generate comprehensive rollback procedures for each migration phase
32- **Data Recovery Scripts:** Create point-in-time data restoration procedures
33- **Service Rollback:** Plan service version rollbacks with traffic management
34- **Validation Checkpoints:** Define success criteria and rollback triggers
35 
36## Quick Start — plan → check compatibility → generate rollback
37 
38All paths relative to this skill folder; sample inputs in `assets/`, expected shapes in `expected_outputs/`.
39 
40```bash
41# 1. Generate the migration plan from a spec (copy assets/sample_database_migration.json)
42python3 scripts/migration_planner.py --input migration_spec.json --format json -o migration_plan.json
43 
44# 2. Check schema/API compatibility — exits non-zero unless fully compatible (CI gate)
45python3 scripts/compatibility_checker.py --before assets/database_schema_before.json --after assets/database_schema_after.json --type database --format json -o compatibility.json
46 
47# 3. Generate the rollback runbook from the plan
48python3 scripts/rollback_generator.py --input migration_plan.json --format both -o rollback_runbook
49```
50 
51Outputs chain: `migration_plan.json` (`phases`, `risks`, `estimated_duration_hours`) feeds step 3; `compatibility.json` reports `overall_compatibility` plus `breaking_changes_count` / `potentially_breaking_count`.
52 
53**Gate:** the migration is not approved until (a) `compatibility_checker` exits 0 (`overall_compatibility: compatible`) or every breaking/potentially-breaking item is explicitly accepted by the owner in writing, and (b) a rollback runbook exists for every phase in the plan. Re-run both checks after any schema revision.
54 
55## Migration Patterns
56 
57### Database Migrations
58 
59#### Schema Evolution Patterns
601. **Expand-Contract Pattern**
61 - **Expand:** Add new columns/tables alongside existing schema
62 - **Dual Write:** Application writes to both old and new schema
63 - **Migration:** Backfill historical data to new schema
64 - **Contract:** Remove old columns/tables after validation
65 
662. **Parallel Schema Pattern**
67 - Run new schema in parallel with existing schema
68 - Use feature flags to route traffic between schemas
69 - Validate data consistency between parallel systems
70 - Cutover when confidence is high
71 
723. **Event Sourcing Migration**
73 - Capture all changes as events during migration window
74 - Apply events to new schema for consistency
75 - Enable replay capability for rollback scenarios
76 
77#### Data Migration Strategies
781. **Bulk Data Migration**
79 - **Snapshot Approach:** Full data copy during maintenance window
80 - **Incremental Sync:** Continuous data synchronization with change tracking
81 - **Stream Processing:** Real-time data transformation pipelines
82 
832. **Dual-Write Pattern**
84 - Write to both source and target systems during migration
85 - Implement compensation patterns for write failures
86 - Use distributed transactions where consistency is critical
87 
883. **Change Data Capture (CDC)**
89 - Stream database changes to target system
90 - Maintain eventual consistency during migration
91 - Enable zero-downtime migrations for large datasets
92 
93### Service Migrations
94 
95#### Strangler Fig Pattern
961. **Intercept Requests:** Route traffic through proxy/gateway
972. **Gradually Replace:** Implement new service functionality incrementally
983. **Legacy Retirement:** Remove old service components as new ones prove stable
994. **Monitoring:** Track performance and error rates throughout transition
100 
101```mermaid
102graph TD
103 A[Client Requests] --> B[API Gateway]
104 B --> C{Route Decision}
105 C -->|Legacy Path| D[Legacy Service]
106 C -->|New Path| E[New Service]
107 D --> F[Legacy Database]
108 E --> G[New Database]
109```
110 
111#### Parallel Run Pattern
1121. **Dual Execution:** Run both old and new services simultaneously
1132. **Shadow Traffic:** Route production traffic to both systems
1143. **Result Comparison:** Compare outputs to validate correctness
1154. **Gradual Cutover:** Shift traffic percentage based on confidence
116 
117#### Canary Deployment Pattern
1181. **Limited Rollout:** Deploy new service to small percentage of users
1192. **Monitoring:** Track key metrics (latency, errors, business KPIs)
1203. **Gradual Increase:** Increase traffic percentage as confidence grows
1214. **Full Rollout:** Complete migration once validation passes
122 
123### Infrastructure Migrations
124 
125#### Cloud-to-Cloud Migration
1261. **Assessment Phase**
127 - Inventory existing resources and dependencies
128 - Map services to target cloud equivalents
129 - Identify vendor-specific features requiring refactoring
130 
1312. **Pilot Migration**
132 - Migrate non-critical workloads first
133 - Validate performance and cost models
134 - Refine migration procedures
135 
1363. **Production Migration**
137 - Use infrastructure as code for consistency
138 - Implement cross-cloud networking during transition
139 - Maintain disaster recovery capabilities
140 
141#### On-Premises to Cloud Migration
1421. **Lift and Shift**
143 - Minimal changes to existing applications
144 - Quick migration with optimization later
145 - Use cloud migration tools and services
146 
1472. **Re-architecture**
148 - Redesign applications for cloud-native patterns
149 - Adopt microservices, containers, and serverless
150 - Implement cloud security and scaling practices
151 
1523. **Hybrid Approach**
153 - Keep sensitive data on-premises
154 - Migrate compute workloads to cloud
155 - Implement secure connectivity between environments
156 
157## Feature Flags for Migrations
158 
159### Progressive Feature Rollout
160```python
161# Example feature flag implementation
162class MigrationFeatureFlag:
163 def __init__(self, flag_name, rollout_percentage=0):
164 self.flag_name = flag_name
165 self.rollout_percentage = rollout_percentage
166 
167 def is_enabled_for_user(self, user_id):
168 hash_value = hash(f"{self.flag_name}:{user_id}")
169 return (hash_value % 100) < self.rollout_percentage
170 
171 def gradual_rollout(self, target_percentage, step_size=10):
172 while self.rollout_percentage < target_percentage:
173 self.rollout_percentage = min(
174 self.rollout_percentage + step_size,
175 target_percentage
176 )
177 yield self.rollout_percentage
178```
179 
180### Circuit Breaker Pattern
181Implement automatic fallback to legacy systems when new systems show degraded performance:
182 
183```python
184class MigrationCircuitBreaker:
185 def __init__(self, failure_threshold=5, timeout=60):
186 self.failure_count = 0
187 self.failure_threshold = failure_threshold
188 self.timeout = timeout
189 self.last_failure_time = None
190 self.state = 'CLOSED' # CLOSED, OPEN, HALF_OPEN
191 
192 def call_new_service(self, request):
193 if self.state == 'OPEN':
194 if self.should_attempt_reset():
195 self.state = 'HALF_OPEN'
196 else:
197 return self.fallback_to_legacy(request)
198 
199 try:
200 response = self.new_service.process(request)
201 self.on_success()
202 return response
203 except Exception as e:
204 self.on_failure()
205 return self.fallback_to_legacy(request)
206```
207 
208## Data Validation and Reconciliation
209 
210### Validation Strategies
2111. **Row Count Validation**
212 - Compare record counts between source and target
213 - Account for soft deletes and filtered records
214 - Implement threshold-based alerting
215 
2162. **Checksums and Hashing**
217 - Generate checksums for critical data subsets
218 - Compare hash values to detect data drift
219 - Use sampling for large datasets
220 
2213. **Business Logic Validation**
222 - Run critical business queries on both systems
223 - Compare aggregate results (sums, counts, averages)
224 - Validate derived data and calculations
225 
226### Reconciliation Patterns
2271. **Delta Detection**
228 ```sql
229 -- Example delta query for reconciliation
230 SELECT 'missing_in_target' as issue_type, source_id
231 FROM source_table s
232 WHERE NOT EXISTS (
233 SELECT 1 FROM target_table t
234 WHERE t.id = s.id
235 )
236 UNION ALL
237 SELECT 'extra_in_target' as issue_type, target_id
238 FROM target_table t
239 WHERE NOT EXISTS (
240 SELECT 1 FROM source_table s
241 WHERE s.id = t.id
242 );
243 ```
244 
2452. **Automated Correction**
246 - Implement data repair scripts for common issues
247 - Use idempotent operations for safe re-execution
248 - Log all correction actions for audit trails
249 
250## Rollback Strategies
251 
252### Database Rollback
2531. **Schema Rollback**
254 - Maintain schema version control
255 - Use backward-compatible migrations when possible
256 - Keep rollback scripts for each migration step
257 
2582. **Data Rollback**
259 - Point-in-time recovery using database backups
260 - Transaction log replay for precise rollback points
261 - Maintain data snapshots at migration checkpoints
262 
263### Service Rollback
2641. **Blue-Green Deployment**
265 - Keep previous service version running during migration
266 - Switch traffic back to blue environment if issues arise
267 - Maintain parallel infrastructure during migration window
268 
2692. **Rolling Rollback**
270 - Gradually shift traffic back to previous version
271 - Monitor system health during rollback process
272 - Implement automated rollback triggers
273 
274### Infrastructure Rollback
2751. **Infrastructure as Code**
276 - Version control all infrastructure definitions
277 - Maintain rollback terraform/CloudFormation templates
278 - Test rollback procedures in staging environments
279 
2802. **Data Persistence**
281 - Preserve data in original location during migration
282 - Implement data sync back to original systems
283 - Maintain backup strategies across both environments
284 
285## Risk Assessment Framework
286 
287### Risk Categories
2881. **Technical Risks**
289 - Data loss or corruption
290 - Service downtime or degraded performance
291 - Integration failures with dependent systems
292 - Scalability issues under production load
293 
2942. **Business Risks**
295 - Revenue impact from service disruption
296 - Customer experience degradation
297 - Compliance and regulatory concerns
298 - Brand reputation impact
299 
3003. **Operational Risks**
301 - Team knowledge gaps
302 - Insufficient testing coverage
303 - Inadequate monitoring and alerting
304 - Communication breakdowns
305 
306### Risk Mitigation Strategies
3071. **Technical Mitigations**
308 - Comprehensive testing (unit, integration, load, chaos)
309 - Gradual rollout with automated rollback triggers
310 - Data validation and reconciliation processes
311 - Performance monitoring and alerting
312 
3132. **Business Mitigations**
314 - Stakeholder communication plans
315 - Business continuity procedures
316 - Customer notification strategies
317 - Revenue protection measures
318 
3193. **Operational Mitigations**
320 - Team training and documentation
321 - Runbook creation and testing
322 - On-call rotation planning
323 - Post-migration review processes
324 
325## Migration Runbooks
326 
327### Pre-Migration Checklist
328- [ ] Migration plan reviewed and approved
329- [ ] Rollback procedures tested and validated
330- [ ] Monitoring and alerting configured
331- [ ] Team roles and responsibilities defined
332- [ ] Stakeholder communication plan activated
333- [ ] Backup and recovery procedures verified
334- [ ] Test environment validation complete
335- [ ] Performance benchmarks established
336- [ ] Security review completed
337- [ ] Compliance requirements verified
338 
339### During Migration
340- [ ] Execute migration phases in planned order
341- [ ] Monitor key performance indicators continuously
342- [ ] Validate data consistency at each checkpoint
343- [ ] Communicate progress to stakeholders
344- [ ] Document any deviations from plan
345- [ ] Execute rollback if success criteria not met
346- [ ] Coordinate with dependent teams
347- [ ] Maintain detailed execution logs
348 
349### Post-Migration
350- [ ] Validate all success criteria met
351- [ ] Perform comprehensive system health checks
352- [ ] Execute data reconciliation procedures
353- [ ] Monitor system performance over 72 hours
354- [ ] Update documentation and runbooks
355- [ ] Decommission legacy systems (if applicable)
356- [ ] Conduct post-migration retrospective
357- [ ] Archive migration artifacts
358- [ ] Update disaster recovery procedures
359 
360## Tools and Technologies
361 
362### Migration Planning Tools
363- **migration_planner.py:** Automated migration plan generation
364- **compatibility_checker.py:** Schema and API compatibility analysis
365- **rollback_generator.py:** Comprehensive rollback procedure generation
366 
367### Validation Tools
368- Database comparison utilities (schema and data)
369- API contract testing frameworks
370- Performance benchmarking tools
371- Data quality validation pipelines
372 
373### Monitoring and Alerting
374- Real-time migration progress dashboards
375- Automated rollback trigger systems
376- Business metric monitoring
377- Stakeholder notification systems
378 
379## Best Practices
380 
381### Planning Phase
3821. **Start with Risk Assessment:** Identify all potential failure modes before planning
3832. **Design for Rollback:** Every migration step should have a tested rollback procedure
3843. **Validate in Staging:** Execute full migration process in production-like environment
3854. **Plan for Gradual Rollout:** Use feature flags and traffic routing for controlled migration
386 
387### Execution Phase
3881. **Monitor Continuously:** Track both technical and business metrics throughout
3892. **Communicate Proactively:** Keep all stakeholders informed of progress and issues
3903. **Document Everything:** Maintain detailed logs for post-migration analysis
3914. **Stay Flexible:** Be prepared to adjust timeline based on real-world performance
392 
393### Validation Phase
3941. **Automate Validation:** Use automated tools for data consistency and performance checks
3952. **Business Logic Testing:** Validate critical business processes end-to-end
3963. **Load Testing:** Verify system performance under expected production load
3974. **Security Validation:** Ensure security controls function properly in new environment
398 
399## Integration with Development Lifecycle
400 
401### CI/CD Integration
402```yaml
403# Example migration pipeline stage
404migration_validation:
405 stage: test
406 script:
407 - python scripts/compatibility_checker.py --before=old_schema.json --after=new_schema.json
408 - python scripts/migration_planner.py --config=migration_config.json --validate
409 artifacts:
410 reports:
411 - compatibility_report.json
412 - migration_plan.json
413```
414 
415### Infrastructure as Code
416```terraform
417# Example Terraform for blue-green infrastructure
418resource "aws_instance" "blue_environment" {
419 count = var.migration_phase == "preparation" ? var.instance_count : 0
420 # Blue environment configuration
421}
422 
423resource "aws_instance" "green_environment" {
424 count = var.migration_phase == "execution" ? var.instance_count : 0
425 # Green environment configuration
426}
427```
428 
429This Migration Architect skill provides a comprehensive framework for planning, executing, and validating complex system migrations while minimizing business impact and technical risk. The combination of automated tools, proven patterns, and detailed procedures enables organizations to confidently undertake even the most complex migration projects.

Discussion

Alternatives

Also in Roadmap & prioritiesSee all 277 in Product →