You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Create new "Develop" page with filename requirements
- Move CI platform integrations to "Release" page
- Simplify overview with focus on core workflow
- Update navigation structure in docs.json
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <[email protected]>
To ensure proper version control and execution, your SQL migration filenames must follow a specific structure. Each filename consists of three main parts: a **Version**, a **Description**, and an optional **Change Type Suffix**.
8
+
9
+
`<Version>_<Description>_<Suffix>.sql`
10
+
11
+
### Versioning Format
12
+
13
+
Bytebase supports both semantic versioning and simple timestamp-based versions. The version number is crucial for ordering migrations correctly.
14
+
15
+
The version must begin with a number. A `v` or `V` prefix is optional.
16
+
17
+
**Valid Version Examples:**
18
+
19
+
-`202501150900_add_user_table.sql`
20
+
-`v1.2.3_description.sql`
21
+
-`V2_add_users_table.sql`
22
+
-`1.0_initial_schema.sql`
23
+
24
+
### Change Type Suffixes
25
+
26
+
You can add a suffix to the filename to specify the change type. **If the suffix is omitted, the file will be treated as the default `DDL` type.** The suffix is added to the end of the filename, just before the `.sql` extension.
27
+
28
+
-**DDL (Default)**
29
+
30
+
- Used for standard schema changes (Data Definition Language). This is the default type used when no suffix is present.
31
+
-**Example**: `v1.0_create_table.sql`
32
+
33
+
-**DML**
34
+
35
+
- Used for data manipulations (Data Manipulation Language).
36
+
- Add the `_dml` suffix.
37
+
-**Example**: `v1.0_insert_data_dml.sql`
38
+
39
+
-**Ghost**
40
+
- Used for schema changes performed using the `gh-ost` tool.
Copy file name to clipboardExpand all lines: mintlify/gitops/overview.mdx
+1-111Lines changed: 1 addition & 111 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ title: Overview
4
4
5
5
Bytebase offers a database-as-code workflow, enabling you to manage database changes directly through your version control system (VCS).
6
6
7
-
Bytebase GitOps workflow is built upon the [Bytebase API](/integrations/api/overview). It provides the ultimate flexibility to customize the GitOps workflow to integrate with your CI/CD pipeline.
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).
-**Merge protection** - Block merges when critical issues are detected
27
-
-**Database-specific rules** - Tailored validation for different database engines
28
21
29
22
## GitOps Workflow
30
23
@@ -62,106 +55,3 @@ The release follows your configured deployment pipeline:
62
55
- Each deployment is tracked with timing and status
63
56
64
57
**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.
65
-
66
-
## Requirements
67
-
68
-
## Filename Requirements
69
-
70
-
To ensure proper version control and execution, your SQL migration filenames must follow a specific structure. Each filename consists of three main parts: a **Version**, a **Description**, and an optional **Change Type Suffix**.
71
-
72
-
`<Version>_<Description>_<Suffix>.sql`
73
-
74
-
### Versioning Format
75
-
76
-
Bytebase supports both semantic versioning and simple timestamp-based versions. The version number is crucial for ordering migrations correctly.
77
-
78
-
The version must begin with a number. A `v` or `V` prefix is optional.
79
-
80
-
**Valid Version Examples:**
81
-
82
-
-`202501150900_add_user_table.sql`
83
-
-`v1.2.3_description.sql`
84
-
-`V2_add_users_table.sql`
85
-
-`1.0_initial_schema.sql`
86
-
87
-
### Change Type Suffixes
88
-
89
-
You can add a suffix to the filename to specify the change type. **If the suffix is omitted, the file will be treated as the default `DDL` type.** The suffix is added to the end of the filename, just before the `.sql` extension.
90
-
91
-
-**DDL (Default)**
92
-
93
-
- Used for standard schema changes (Data Definition Language). This is the default type used when no suffix is present.
94
-
-**Example**: `v1.0_create_table.sql`
95
-
96
-
-**DML**
97
-
98
-
- Used for data manipulations (Data Manipulation Language).
99
-
- Add the `_dml` suffix.
100
-
-**Example**: `v1.0_insert_data_dml.sql`
101
-
102
-
-**Ghost**
103
-
- Used for schema changes performed using the `gh-ost` tool.
104
-
- Add the `_ghost` suffix.
105
-
-**Example**: `v1.0_alter_table_ghost.sql`
106
-
107
-
## GitHub Actions
108
-
109
-
<Card
110
-
title="Tutorial: Database GitOps with GitHub Actions"
111
-
icon="graduation-cap"
112
-
href="/tutorials/gitops-github-workflow/"
113
-
horizontal
114
-
/>
115
-
116
-
<Note>
117
-
118
-
To reach your self-hosted Bytebase from GitHub Actions, you can choose either options:
119
-
120
-
1. Tunnel GitHub Actions using [Cloudflare Zero Trust](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) with [Cloudflare Warp GitHub Actions](https://github.com/marketplace/actions/setup-cloudflare-warp).
121
-
122
-
1. Use [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners).
123
-
124
-
</Note>
125
-
126
-
Bytebase provides pre-built [GitHub Actions](https://github.com/marketplace?query=bytebase&type=actions) to ease the GitHub integration.
127
-
128
-
## Azure DevOps Pipeline
129
-
130
-
<Card
131
-
title="Tutorial: Database GitOps with Azure DevOps Pipeline"
132
-
icon="graduation-cap"
133
-
href="/tutorials/gitops-azure-devops-workflow/"
134
-
horizontal
135
-
/>
136
-
137
-
## GitLab CI
138
-
139
-
<Card
140
-
title="Tutorial: Database GitOps with GitLab CI"
141
-
icon="graduation-cap"
142
-
href="/tutorials/gitops-gitlab-workflow/"
143
-
horizontal
144
-
/>
145
-
146
-
<Note>
147
-
148
-
If you're using **self-hosted GitLab** in an internal network:
149
-
150
-
1. You’ll need to [manually load the `bytebase/bytebase-action` image](/tutorials/gitops-gitlab-workflow#use-bytebase-action-in-an-offline-gitlab-runner) into your internal Docker registry.
151
-
152
-
1. Set the [`clone_url` in GitLab Runner](/tutorials/gitops-gitlab-workflow#resolve-gitlab-clone-redirect-in-internal-network) to avoid redirection to external addresses.
153
-
154
-
</Note>
155
-
156
-
## Bitbucket Pipelines
157
-
158
-
<Card
159
-
title="Tutorial: Database GitOps with Bitbucket Pipelines"
160
-
icon="graduation-cap"
161
-
href="/tutorials/gitops-bitbucket-workflow/"
162
-
horizontal
163
-
/>
164
-
165
-
## API
166
-
167
-
If the pre-built GitHub Actions do not meet your needs or you want to integrate with other VCSs, you can use the [Bytebase API](/integrations/api/overview) to build your own GitOps workflow.
Copy file name to clipboardExpand all lines: mintlify/gitops/release.mdx
+50-24Lines changed: 50 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,41 +2,67 @@
2
2
title: Release
3
3
---
4
4
5
-
A release is an immutable, deployable artifact that contains database changes. It serves as the database equivalent of a Docker image in modern CI/CD pipelines.
5
+
Bytebase integrates with popular CI/CD platforms to automate database releases through GitOps workflows.
6
6
7
-
## Overview
7
+
## Release Workflow
8
8
9
-
In Bytebase's GitOps workflow, a release is automatically created when changes are merged to your main branch. It packages all SQL migration files into a single deployable unit that can be progressively rolled out across your database environments.
9
+
When triggered by your CI/CD pipeline, Bytebase automatically creates a **release** - an immutable package containing all your SQL migration files. This release can then be progressively deployed across your database environments (test → staging → production), ensuring consistent and traceable database changes.
10
10
11
-
## Key Characteristics
11
+
## GitHub Actions
12
12
13
-
-**Immutable** - Once created, a release cannot be modified, ensuring deployment consistency
14
-
-**Version-controlled** - Each release is tied to a specific VCS commit for full traceability
15
-
-**Environment-agnostic** - The same release can be deployed across test, staging, and production
16
-
-**Auditable** - Complete history of creation, deployment, and rollback operations
title="Tutorial: Database GitOps with GitHub Actions"
15
+
icon="graduation-cap"
16
+
href="/tutorials/gitops-github-workflow/"
17
+
horizontal
18
+
/>
18
19
19
-
## Benefits
20
+
<Note>
20
21
21
-
### Consistency
22
+
To reach your self-hosted Bytebase from GitHub Actions, you can choose either options:
22
23
23
-
The same release deployed to test is exactly what gets deployed to production - no manual SQL copying or modification.
24
+
1. Tunnel GitHub Actions using [Cloudflare Zero Trust](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/) with [Cloudflare Warp GitHub Actions](https://github.com/marketplace/actions/setup-cloudflare-warp).
24
25
25
-
### Idempotent Deployment
26
+
1. Use [self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners).
26
27
27
-
Bytebase tracks which migrations have been applied to each database. When deploying a release:
28
+
</Note>
28
29
29
-
- Already applied migrations are automatically skipped
30
-
- Only new migrations are executed
31
-
- Safe to re-deploy the same release multiple times
32
-
- No risk of duplicate schema changes or data corruption
30
+
Bytebase provides pre-built [GitHub Actions](https://github.com/marketplace?query=bytebase&type=actions) to ease the GitHub integration.
33
31
34
-
### Compliance
32
+
##Azure DevOps Pipeline
35
33
36
-
- Every change is reviewed before release creation
37
-
- Deployment requires appropriate approvals
38
-
- Full audit trail for regulatory requirements
34
+
<Card
35
+
title="Tutorial: Database GitOps with Azure DevOps Pipeline"
36
+
icon="graduation-cap"
37
+
href="/tutorials/gitops-azure-devops-workflow/"
38
+
horizontal
39
+
/>
39
40
40
-
### Integration
41
+
## GitLab CI
42
+
43
+
<Card
44
+
title="Tutorial: Database GitOps with GitLab CI"
45
+
icon="graduation-cap"
46
+
href="/tutorials/gitops-gitlab-workflow/"
47
+
horizontal
48
+
/>
49
+
50
+
<Note>
51
+
52
+
If you're using **self-hosted GitLab** in an internal network:
53
+
54
+
1. You'll need to [manually load the `bytebase/bytebase-action` image](/tutorials/gitops-gitlab-workflow#use-bytebase-action-in-an-offline-gitlab-runner) into your internal Docker registry.
55
+
56
+
1. Set the [`clone_url` in GitLab Runner](/tutorials/gitops-gitlab-workflow#resolve-gitlab-clone-redirect-in-internal-network) to avoid redirection to external addresses.
57
+
58
+
</Note>
59
+
60
+
## Bitbucket Pipelines
61
+
62
+
<Card
63
+
title="Tutorial: Database GitOps with Bitbucket Pipelines"
64
+
icon="graduation-cap"
65
+
href="/tutorials/gitops-bitbucket-workflow/"
66
+
horizontal
67
+
/>
41
68
42
-
Releases integrate seamlessly with existing CI/CD tools, treating database changes with the same rigor as application deployments.
0 commit comments