Skip to content

Commit 42e637f

Browse files
d-bytebaseclaudeCopilot
authored
docs: refactor GitOps overview to emphasize database CI/CD best practices (#878)
* docs: refactor GitOps overview to emphasize database CI/CD best practices - Add clear goal statement that database schema changes should follow same practices as application code - Emphasize schema changes are equivalent to API changes in microservices - Simplify redundant wording throughout the document - Clarify that deployment timing is configurable and consistent with application deployment - Remove redundant Integration Options section 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * Update mintlify/gitops/overview.mdx Co-authored-by: Copilot <[email protected]> * docs: update GitLab Flow documentation link - Replace outdated GitLab Flow documentation link with the current blog post URL 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent ee76112 commit 42e637f

File tree

1 file changed

+39
-30
lines changed

1 file changed

+39
-30
lines changed

mintlify/gitops/overview.mdx

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,60 @@
22
title: Overview
33
---
44

5-
Bytebase offers a database-as-code workflow, enabling you to manage database changes directly through your version control system (VCS).
5+
## Goal
66

7-
Bytebase provides pre-built actions for popular CI/CD platforms. For custom requirements, you can build your own pipeline using the [Bytebase API](/integrations/api/overview).
7+
GitOps for database CI/CD brings the same rigor and automation used in application development to database schema management. Database schema changes are equivalent to API changes in microservices - they define contracts between services, and misalignment can break production systems.
88

9-
## Capabilities
9+
By treating databases as dependencies that require versioning, compatibility management, and progressive rollout strategies, schema changes gain the same safety and predictability as application code.
1010

11-
Bytebase GitOps integration provides two core capabilities:
11+
## Why Database Schema Changes Matter
1212

13-
### Versioned Database Migrations
13+
Database schema changes are fundamentally similar to API changes:
14+
- They define contracts between services
15+
- Breaking changes can cause application failures
16+
- They require versioning and compatibility considerations
17+
- They benefit from progressive rollout and feature flagging
1418

15-
- **Database-as-code workflow** - Manage database changes through your VCS just like application code
16-
- **Schema and data changes** - Support for both DDL (CREATE/ALTER/DROP tables, indexes) and DML (INSERT/UPDATE/DELETE) operations
17-
- **Change detection** - Automatically detects and skips already applied migrations, ensuring idempotency
18-
- **Progressive deployments** - Automated rollout across environments (test → staging → production)
19-
- **Multi-database support** - Apply changes across multiple databases with batch operations
19+
Bytebase enables database-as-code workflows, allowing you to manage database changes through your version control system (VCS) with the same process and confidence as application code.
2020

21+
## Core Capabilities
2122

22-
## GitOps Workflow
23+
### Database-as-Code Workflow
2324

24-
### 1. Development Phase
25+
- **Unified CI/CD Pipeline** - Integrate database changes seamlessly into your existing CI/CD workflows
26+
- **Version Control Integration** - Manage schema changes alongside application code in your VCS
27+
- **Automated Change Detection** - Intelligently detect and apply only necessary changes, ensuring idempotency
28+
- **Progressive Deployment** - Roll out changes across environments (development → staging → production) with configurable automation and approval gates
2529

26-
Developers create SQL migration files in their feature branches.
30+
### Enterprise-Grade Safety
2731

28-
### 2. Review Phase (Pull Request)
32+
- **SQL Review and Validation** - Automatic policy enforcement during pull requests
33+
- **Rollback Capabilities** - Support for safe schema rollbacks when needed
34+
- **Multi-Region Support** - Deploy to isolated regional databases with separate or unified Bytebase deployments
35+
- **Batch Operations** - Apply changes across multiple databases consistently
2936

30-
- SQL review runs automatically on the PR
31-
- Validates changes against configured policies
32-
- No release created yet - only validation
37+
## GitOps Workflow
3338

34-
### 3. Release Creation (Merge)
39+
### 1. Development Phase
40+
41+
Developers create SQL migration files in feature branches, following the same branch management strategy as application code (e.g., [GitHub Flow](https://docs.github.com/en/get-started/quickstart/github-flow), [GitLab Flow](https://about.gitlab.com/blog/gitlab-flow-duo/)).
3542

36-
When the PR is merged to main:
43+
### 2. Review Phase (Pull Request)
3744

38-
- GitOps integration automatically creates a new release
39-
- All SQL files from the merge are packaged together
40-
- Release is assigned a unique identifier
41-
- Linked to the merge commit for traceability
45+
- Automated SQL review validates changes against configured policies
46+
- Schema changes are reviewed alongside application code changes
47+
- Compatibility checks ensure schema and code alignment
4248

43-
### 4. Progressive Deployment
49+
### 3. Release Creation and Deployment
4450

45-
The release follows your configured deployment pipeline:
51+
After PR merge, releases can be created and deployed according to your workflow, consistent with application code deployment:
4652

47-
- **Test Environment**: Automatic deployment after creation
48-
- **Staging Environment**: May require manual approval
49-
- **Production Environment**: Typically requires explicit approval
50-
- Each deployment is tracked with timing and status
53+
- GitOps integration can create versioned releases containing SQL migrations
54+
- Releases are linked to commits for full traceability
55+
- Deployment timing is configurable based on your pipeline strategy:
56+
- **Automatic**: Deploy immediately after merge (common for development/test environments)
57+
- **Time-based**: Schedule deployments for specific windows
58+
- **Manual approval**: Require explicit approval before deployment (common for production)
59+
- Feature flags can decouple schema deployment from applications using new schema version
5160

52-
**Important**: When deploying a release, Bytebase automatically detects which migrations have already been applied to the target database and skips them. This ensures safe re-deployment and allows the same release to be deployed multiple times without errors.
61+
**Key Principle**: Bytebase automatically detects previously applied migrations and skips them, ensuring safe re-deployment and idempotent operations across all environments.

0 commit comments

Comments
 (0)