|
2 | 2 | title: Plan |
3 | 3 | --- |
4 | 4 |
|
5 | | -A **Plan** is the core component of Bytebase’s CI/CD pipeline. It defines a series of schema or data changes to be applied to one or more databases. |
| 5 | +A **Plan** is the core component of Bytebase’s CI/CD pipeline. It defines a series of schema or data changes to be applied to one or more databases. It can be converted into an **Issue** for review and deployment. |
6 | 6 |
|
7 | | -### 1. Create a New Plan |
8 | | -In your project, go to **CI/CD** > **Plans** in the left menu and click **New Plan**. |
| 7 | +### 1. Create Plan |
9 | 8 |
|
10 | | - |
| 9 | +In your project, navigate to **CI/CD** > **Plans** and click **+ New Plan**. |
11 | 10 |
|
12 | | -### 2. Choose the Change Type |
13 | | -Select either **Schema Migration (DDL)** or **Data Migration (DML)**. After adding the first change, you can continue to add more. |
| 11 | +### 2. Select Databases |
14 | 12 |
|
15 | | - |
| 13 | +Choose one or moretarget databases and click **Confirm**. |
16 | 14 |
|
17 | | -### 3. Select Target Databases |
18 | | -Choose one or more databases where the changes will be applied. Click **Confirm** to proceed. |
| 15 | +### 3. Add Changes |
19 | 16 |
|
20 | | - |
| 17 | +Add SQL statements (multiple allowed by clicking **+ Add Change**) and click **Create**. The plan will be in `Draft` status with automatic SQL review. |
21 | 18 |
|
22 | | -### 4. Add Changes |
23 | | -Fill in the SQL statement. You can add multiple changes to the same plan. Once done, click **Create**. |
| 19 | + |
24 | 20 |
|
25 | | - |
26 | | - |
| 21 | +### 4. Submit for Review (Enterprise) |
27 | 22 |
|
28 | | -### 5. Submit for Review |
29 | | -The plan starts in a `draft` state. Click **Ready for Review** to submit it for approval. |
| 23 | +Fix the warning, and click **Ready for Review**. The plan will be converted into an issue and await approval. Approval follows [configured rules](/change-database/approval). |
30 | 24 |
|
31 | | - |
| 25 | + |
32 | 26 |
|
33 | | -### 6. Approve and Roll Out |
34 | | -Once approved, go to the **Rollout** section to begin deployment. |
| 27 | +### 5. Deploy |
35 | 28 |
|
36 | | - |
37 | | - |
| 29 | +After approval, go to the **Rollout** section to deploy changes. You may configure the rollout policy to `Automatic` in the [environment](/change-database/environment-policy/rollout-policy). |
38 | 30 |
|
39 | | -### 7. Deploy to Environments |
40 | | -First, deploy to the `Test` environment. If successful, proceed to deploy to `Prod`. |
| 31 | + |
41 | 32 |
|
42 | | - |
43 | | - |
| 33 | +Deploy to `Test` first, then `Prod` after success. |
0 commit comments