Recipes
Practical, copy-paste-ready recipes for common migration scenarios.
What are Recipes?
Recipes are complete, working code examples that solve common real-world migration challenges. Unlike API documentation, recipes show you the full implementation including setup, configuration, error handling, and testing.
Each recipe includes:
- Complete code - Copy-paste ready implementation
- Explanation - What the code does and why
- Testing guide - How to verify it works
- Common issues - Troubleshooting tips
Available Recipes
Database Implementations
- PostgreSQL with Backup - Complete PostgreSQL handler with pg_dump/restore backup
- MongoDB Migrations - NoSQL migrations with MongoDB
- Testing Migrations - Unit and integration testing patterns
Advanced Patterns
- Multi-Database Migrations - Coordinate migrations across multiple databases
- Custom Validation - Extend the validation system with custom rules
Recipe Categories
By Database Type
- SQL: PostgreSQL, MySQL, SQL Server
- NoSQL: MongoDB, Firebase/Firestore
- In-Memory: Redis (for caching/session management)
- Multi-Database: Coordinating across different databases
By Use Case
- Backup & Recovery: Custom backup implementations
- Testing: Unit tests, integration tests, mocks
- CI/CD: Pipeline integration, automated deployments
- Validation: Custom rules, pre-migration checks
- Performance: Large-scale migrations, batch processing
How to Use Recipes
- Find the recipe that matches your use case
- Read the complete example to understand the pattern
- Copy the code into your project
- Adapt the implementation to your specific needs
- Test thoroughly before deploying
Recipes are designed to be customized. Use them as starting points and adapt them to your specific requirements.
Contributing Recipes
Have a useful migration pattern to share? We welcome recipe contributions!
See the Contributing Guide for how to submit recipes.
Next Steps
- Guides - Learn core MSR concepts
- API Reference - Detailed API documentation
- Extending MSR - Extend MSR with custom loggers, renderers, and more