Skip to content

Commit d84d820

Browse files
update first schema tuts
1 parent a2ae075 commit d84d820

File tree

6 files changed

+8
-15
lines changed

6 files changed

+8
-15
lines changed
-44.7 KB
Loading
-24.2 KB
Loading
Binary file not shown.
7.84 KB
Loading
Binary file not shown.

docs/tutorials/first-schema-change.mdx

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,32 @@ In this tutorial, you'll use the default sample databases to get familiar with t
2020

2121
## Step 2 - Configure the SQL Review
2222

23-
1. Navigate to **CI/CD** > **SQL Review** in the left menu. Click **+ New SQL Review** to create a new SQL review.
23+
1. Navigate to **CI/CD** > **SQL Review** in the left menu. Click **+ Create SQL review** to create a new SQL review.
2424

25-
1. Choose `Sample Template` which has 20 enabled rules and click **Confirm and add**. Attach the SQL review to Environment `Prod` and click **Confirm**.
26-
27-
1. You'll see the SQL review is created.
28-
![sql-review-configured](/content/docs/tutorials/first-schema-change/bb-sql-review-configured.webp)
25+
1. Choose `Sample Template` which has 19 enabled rules and click **Next**. Click **Confirm and add** to attach the SQL review to Environment `Prod` and click **Confirm**. The SQL review is created.
2926

3027
## Step 3 - Create a Plan
3128

3229
1. Navigate to **CI/CD** > **Plans** in the left menu and click **+ New Plan**.
33-
![new-plan](/content/docs/change-database/plan/bb-new-plan.webp)
34-
35-
1. Select **Schema Migration (DDL)** as the change type.
36-
![plan-change-type](/content/docs/change-database/plan/bb-plan-change-type.webp)
3730

38-
1. Select the databases where changes will be applied:
31+
1. Select both databases where changes will be applied:
3932

4033
- `hr_test` on `Test Sample instance`
4134
- `hr_prod` on `Prod Sample instance`
4235

4336
Click **Confirm** to proceed.
44-
![plan-targets](/content/docs/change-database/plan/bb-plan-targets.webp)
4537

46-
1. Add the SQL statement:
38+
1. Add the SQL statement, you may click **Schema Editor** to visually design the schema if needed.
4739

4840
```sql
4941
ALTER TABLE public.employee ADD COLUMN IF NOT EXISTS nickname TEXT;
5042
```
5143

5244
Click **Create** to create the plan.
5345

54-
1. The plan will be in `Draft` status. You may see SQL review warnings, especially for the production environment. This is because Bytebase automatically runs configured checks.
55-
![plan-draft-2-targets-warning](/content/docs/tutorials/first-schema-change/bb-plan-draft-2-targets-warning.webp)
46+
1. The plan will be in `Draft` status. You may see SQL review warnings, this is because Bytebase automatically runs configured checks according to the SQL review policy. Click the warning to view details.
47+
48+
![plan-warning-detail](/content/docs/tutorials/first-schema-change/bb-plan-warning-detail.webp)
5649

5750
## Step 4 - Review and Approve
5851

@@ -64,7 +57,7 @@ In this tutorial, you'll use the default sample databases to get familiar with t
6457

6558
Click **Save** to update the plan. The checks will run again and should pass.
6659

67-
1. Click **Ready for Review** and then **Confirm** to submit the plan for approval.
60+
1. Click **Ready for Review** and to submit the plan for approval.
6861

6962
1. The plan has no approval required.
7063
![issue-2-targets-no-approval](/content/docs/tutorials/first-schema-change/bb-issue-2-targets-no-approval.webp)

0 commit comments

Comments
 (0)