Tutorial: First Schema Change in 5 Minutes
Database CI/CD
Bytebase Database CI/CD provides a complete platform for managing database changes throughout the development lifecycle. By eliminating direct database access and enforcing structured processes, it ensures every change is safe, reviewed, and auditable.The Database CI/CD Lifecycle
Every database change in Bytebase follows a structured lifecycle, regardless of which workflow you choose:1. Plan Change
Define what needs to change—whether it’s a schema migration (DDL) or data modification (DML). Changes can target:- A single database
- Multiple selected databases
- A Database Group (databases sharing the same schema)
2. Automatic SQL Review
Built-in SQL advisor validates every change before execution using configurable Review Policies:- Syntax validation: Catch SQL errors before deployment
- Schema rules: Naming conventions, data types, and structure standards
- Performance checks: Missing indexes, inefficient queries, table scans
- Security policies: Prevent unsafe operations and data exposure
- Backward compatibility: Ensure changes won’t break existing applications
- Best practices: Enforce organizational and industry standards
3. Approval Process
Flexible approval mechanisms based on your workflow choice:- UI-Driven: Built-in multi-level approval within Bytebase
- GitOps:
- Leverage pull request reviews in GitHub/GitLab/Bitbucket
- Integrate with external systems like ServiceNow, Jira, or custom approval workflows
- Condition-based routing: Define custom approval rules based on conditions like environment, risk level, SQL type, and more
4. Multi-Environment Rollout Pipeline
Changes progress through your environments in a controlled pipeline:- Stage-by-stage promotion: Dev → Test → Staging → Production
- Configurable deployment paths: Define custom environment chains
- Database Groups per stage: Different database sets for each environment
- Gated progression: Manual or automatic promotion between stages
- Environment-specific policies: Different review rules per stage
- Parallel execution: Deploy across Database Groups simultaneously
- Sequential ordering: Respect dependencies between databases
- Real-time monitoring: Track progress and view execution logs
- Automatic retry: Handle transient failures gracefully
5. Rollback Capabilities
Instant recovery when things go wrong:- DML Instant Rollback: One-click recovery for UPDATE/DELETE operations
- Schema Rollback: Generate reverse migration scripts for DDL changes
- Automatic backup before risky DML operations
Batch Changes with Database Groups
Deploy changes at scale using Database Groups—logical collections of databases that share the same schema:- Multi-tenant SaaS: Update all tenant databases simultaneously
- Geographic distribution: Roll out to regional databases in controlled waves
- Environment management: Group databases by dev/staging/prod for systematic promotion

