Skip to content

Commit b7a24dd

Browse files
update
1 parent d84d820 commit b7a24dd

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

docs/tutorials/first-schema-change.mdx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ featured: true
1212

1313
import PreparationWithSampleData from '/snippets/tutorials/preparation-with-sample-data.mdx';
1414

15-
In this tutorial, you'll use the default sample databases to get familiar with the product in the quickest way.
15+
Learn Bytebase's schema change workflow using sample databases.
1616

17-
## Step 1 - Run via Docker and Setup
17+
## Step 1 - Setup Bytebase
1818

1919
<PreparationWithSampleData />
2020

21-
## Step 2 - Configure the SQL Review
21+
## Step 2 - Configure SQL Review
2222

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

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.
25+
1. Select `Sample Template` (19 enabled rules), click **Next**. Attach to `Prod` environment and confirm.
2626

2727
## Step 3 - Create a Plan
2828

29-
1. Navigate to **CI/CD** > **Plans** in the left menu and click **+ New Plan**.
29+
1. Navigate to **CI/CD** > **Plans** and click **+ New Plan**.
3030

3131
1. Select both databases where changes will be applied:
3232

@@ -35,46 +35,46 @@ In this tutorial, you'll use the default sample databases to get familiar with t
3535

3636
Click **Confirm** to proceed.
3737

38-
1. Add the SQL statement, you may click **Schema Editor** to visually design the schema if needed.
38+
1. Add this SQL statement (or use **Schema Editor** for visual design):
3939

4040
```sql
4141
ALTER TABLE public.employee ADD COLUMN IF NOT EXISTS nickname TEXT;
4242
```
4343

44-
Click **Create** to create the plan.
44+
Click **Create**.
4545

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.
46+
1. The plan starts in `Draft` status. Any SQL review warnings appear because Bytebase automatically checks against your configured policy. Click warnings for details.
4747

4848
![plan-warning-detail](/content/docs/tutorials/first-schema-change/bb-plan-warning-detail.webp)
4949

5050
## Step 4 - Review and Approve
5151

52-
1. To fix the SQL review warning, edit the SQL to add `NOT NULL DEFAULT ''`:
52+
1. Fix the warning by adding `NOT NULL DEFAULT ''`:
5353

5454
```sql
5555
ALTER TABLE public.employee ADD COLUMN IF NOT EXISTS nickname TEXT NOT NULL DEFAULT '';
5656
```
5757

58-
Click **Save** to update the plan. The checks will run again and should pass.
58+
Click **Save**. The checks rerun and pass.
5959

60-
1. Click **Ready for Review** and to submit the plan for approval.
60+
1. Click **Ready for Review** to submit.
6161

62-
1. The plan has no approval required.
62+
1. No approval is required for this change.
6363
![issue-2-targets-no-approval](/content/docs/tutorials/first-schema-change/bb-issue-2-targets-no-approval.webp)
6464

65-
## Step 4 - Deploy the Changes
65+
## Step 4 - Deploy Changes
6666

67-
1. Navigate to the **Rollout** section. You'll see the deployment is ready for both Test and Prod environments.
67+
1. In the **Rollout** section, both Test and Prod deployments are ready.
6868
![issue-2-targets-to-rollout](/content/docs/tutorials/first-schema-change/bb-issue-2-targets-to-rollout.webp)
6969

70-
1. Click **Run** for the Test stage first and then if it's successful, click **Run** for the Prod stage.
70+
1. Click **Run** for Test, then for Prod after success.
7171

72-
1. When all rollouts are successfully executed, the issue will be marked as `Done`.
72+
1. Once complete, the issue is marked `Done`.
7373

74-
## Next Step
74+
## Next Steps
7575

76-
Now you have successfully performed your first schema change, the core workflow in Bytebase. Next:
76+
You've completed your first schema change. Continue with:
7777

78-
- If you want to move changes between environments, follow [How to Move Schema Change from Test to Prod](/tutorials/how-to-move-schema-change-from-test-to-prod/)
79-
- If you want to rollout manually, follow [Deploy Schema Change with Rollout Policy](/tutorials/deploy-schema-migration/).
80-
- If you want to assign approvers before the rollout, follow [Database Change with Risk-Based Approval Flow](/tutorials/database-change-management-with-risk-adjusted-approval-flow/)
78+
- [Move Schema Changes from Test to Prod](/tutorials/how-to-move-schema-change-from-test-to-prod/) - for environment transitions
79+
- [Deploy with Rollout Policy](/tutorials/deploy-schema-migration/) - for manual rollouts
80+
- [Risk-Based Approval Flow](/tutorials/database-change-management-with-risk-adjusted-approval-flow/) - for adding approvers

0 commit comments

Comments
 (0)