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.

1. Create a New Plan

In your project, go to CI/CD > Plans in the left menu and click New Plan. new-plan

2. Choose the Change Type

Select either Schema Migration (DDL) or Data Migration (DML). After adding the first change, you can continue to add more. plan-change-type

3. Select Target Databases

Choose one or more databases where the changes will be applied. Click Confirm to proceed. plan-targets

4. Add Changes

Fill in the SQL statement. You can add multiple changes to the same plan. Once done, click Create. plan-add-change plan-2-change

5. Submit for Review

The plan starts in a draft state. Click Ready for Review to submit it for approval. plan-draft

6. Approve and Roll Out

Once approved, go to the Rollout section to begin deployment. plan-approval plan-ready-rollout

7. Deploy to Environments

First, deploy to the Test environment. If successful, proceed to deploy to Prod. plan-rollout-test
plan-rollout-prod