Skip to content

Commit da05a95

Browse files
dcos: update deploy schema migration tuts (#907)
* update deploy schema migration tuts * Update mintlify/tutorials/deploy-schema-migration.mdx Co-authored-by: Copilot <[email protected]> * Update mintlify/tutorials/deploy-schema-migration.mdx Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 77e1427 commit da05a95

File tree

8 files changed

+16
-15
lines changed

8 files changed

+16
-15
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38.8 KB
Loading
57.2 KB
Loading
58.8 KB
Loading

mintlify/tutorials/deploy-schema-migration.mdx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ import PreparationWithSampleData from '/snippets/tutorials/preparation-with-samp
1414

1515
Bytebase provides a powerful GUI for deploying schema migrations. This tutorial walks you through deploying schema changes with features such as SQL Review, rollout policies, custom approval, time scheduling, and more.
1616

17-
![4-steps-graph](/content/docs/tutorials/deploy-schema-migration/4-steps-graph.webp)
18-
1917
Bytebase offers **Community**, **Pro**, and **Enterprise** [plans](https://www.bytebase.com/pricing). Higher plans unlock additional deployment capabilities. We will explore them progressively.
2018

2119
### Features covered
2220

2321
- Level 1 – [Automatic rollout (Rollout Policy)](/change-database/environment-policy/rollout-policy/) (available in all plans)
24-
- Level 2 – [SQL Review](/sql-review/review-policy/) (available in all plans)
22+
- Level 2 – Manual rollout with [SQL Review](/sql-review/review-policy/) (available in all plans)
2523
- Level 3 – [Custom Approval](/change-database/approval/) (available in Enterprise)
2624

2725
### Preparation
@@ -30,9 +28,7 @@ Bytebase offers **Community**, **Pro**, and **Enterprise** [plans](https://www.b
3028

3129
### Level 1: Automatic rollout in the Test environment (All plans)
3230

33-
1. In Workspace, go to **Environments** > **Test**, and set the rollout policy to `Automatic`.
34-
35-
![env-test-auto](/content/docs/tutorials/deploy-schema-migration/bb-env-test-auto.webp)
31+
1. In Workspace, go to **Environments** > **Test**, and check `Automatic` under the **Rollout policy**.
3632

3733
1. From the top-left project switcher, select `Sample Project`. Under the **CI/CD** section, click **Plans**, then **+ New Plan**. Choose `Schema Migration (DDL)` and select the `hr_test` database.
3834

@@ -53,11 +49,11 @@ Bytebase offers **Community**, **Pro**, and **Enterprise** [plans](https://www.b
5349

5450
### Level 2: Manual rollout with SQL Review (All plans)
5551

56-
1. In Workspace, go to **Environments** > **Prod**. Leave the rollout policy as the default `Manual`. We'll add an SQL Review policy to the `Prod` environment.
52+
1. In Workspace, go to **Environments** > **Prod**. Leave the `Automatic` unchecked under the **Rollout policy**. Keep the default setting without changing, it's `Require Issue Approval` and `Plan Check Enforcement`>`Block on Errors Only`.
5753

58-
![env-prod-sql-review](/content/docs/tutorials/deploy-schema-migration/bb-env-prod-sql-review.webp)
54+
![rollout-policy-manual-default](/content/docs/tutorials/deploy-schema-migration/bb-rollout-policy-manual-default.webp)
5955

60-
1. Click **SQL Review Policy** to open **SQL Review** under the **Environment > Prod**. Select the `Sample Template`, which has 20 enabled rules.
56+
1. We'll add an SQL Review policy to the `Prod` environment. Click **SQL Review Policy** to open **SQL Review** under the **Environment > Prod**. Select the `Sample Template`, which has 20 enabled rules.
6157

6258
![sql-review-sample](/content/docs/tutorials/deploy-schema-migration/bb-sql-review-sample.webp)
6359

@@ -81,17 +77,22 @@ Bytebase offers **Community**, **Pro**, and **Enterprise** [plans](https://www.b
8177

8278
![plan-to-review-warning-detail](/content/docs/tutorials/deploy-schema-migration/bb-plan-to-review-warning-detail.webp)
8379

84-
1. Fix the SQL by adding the `NOT NULL` constraint. Click **Save** to update the plan. SQL Review runs again and should pass. Click **Ready for Review**, then **Confirm** to submit the plan for approval.
80+
1. Go to the **Rollout** tab, click **Run**. You will see a warning that the SQL Review is not passed. However, you can bypass the SQL Review by checking **Bypass** to continue rollout.
8581

86-
![plan-to-review-pass](/content/docs/tutorials/deploy-schema-migration/bb-plan-to-review-pass.webp)
82+
![rollout-prod-to-run](/content/docs/tutorials/deploy-schema-migration/bb-rollout-prod-to-run.webp)
8783

88-
1. The rollout is now ready to execute manually.
84+
![run-warning](/content/docs/tutorials/deploy-schema-migration/bb-run-warning.webp)
8985

90-
![plan-prod-to-rollout](/content/docs/tutorials/deploy-schema-migration/bb-plan-prod-to-rollout.webp)
86+
1. Go back to the `Prod` environment, and set `Plan Check Enforcement` > `Strict Enforcement` under the **Rollout Policy**, then come back to the plan and refresh, you will see this time you can't bypass the SQL Review.
9187

92-
1. Click **Rollout**, then click **Run**.
88+
![run-error](/content/docs/tutorials/deploy-schema-migration/bb-run-error.webp)
89+
90+
1. Fix the SQL by adding the `NOT NULL` constraint. Click **Save** to update the plan. SQL Review runs again and should pass. Click **Ready for Review** to submit the plan for approval. Because here we don't have approval flow configured, the plan will be approved automatically.
91+
92+
![plan-to-review-pass](/content/docs/tutorials/deploy-schema-migration/bb-plan-to-review-pass.webp)
93+
94+
1. The rollout is now ready, click **Run** again, this time you will see the SQL Review is passed.
9395

94-
![rollout-prod-to-run](/content/docs/tutorials/deploy-schema-migration/bb-rollout-prod-to-run.webp)
9596
![rollout-prod-to-run-detail](/content/docs/tutorials/deploy-schema-migration/bb-rollout-prod-to-run-detail.webp)
9697

9798
1. After the rollout completes, the issue is marked as `Done`.

0 commit comments

Comments
 (0)