How It Works
Each migration file contains explicit DDL or DML statements:When to Use Migration-Based Workflow
✅ Use migration-based workflow when:- You need data migrations (INSERT, UPDATE, DELETE operations)
- You require precise control over the execution order
- Your team is familiar with traditional migration tools
- You’re working with any database type (MySQL, PostgreSQL, SQL Server, MongoDB, etc.)
- You need to perform complex multi-step transformations
- You want explicit versioning of each database change
Complete Workflow
The migration-based workflow consists of three stages:Stage 1: Develop
Write migration files following the naming convention and commit to your repository.Stage 2: SQL Review (PR/MR)
Open a pull/merge request. Automated SQL review runs in CI/CD.Stage 3: Release (Bytebase)
After merge, CI/CD triggers Bytebase to create a release and deploy to target databases.Tutorials
Tutorial: Database GitOps with GitHub Actions
Tutorial: Database GitOps with Azure DevOps Pipeline
Tutorial: Database GitOps with GitLab CI
Tutorial: Database GitOps with Bitbucket Pipelines
Next Steps
Develop
Learn about file naming conventions and versioning strategies
SQL Review CI
Set up automated SQL validation in your CI/CD pipeline
Release
Deploy migrations to your databases
Limitations
Understand constraints and considerations

