Configuring SQL Review requires policy-management permission. Custom approval flows require Enterprise.
Step 1 - Setup Bytebase
-
Ensure Docker is running, then start the Bytebase container:

-
Open Bytebase in localhost:8080, fill in the fields and click Create admin account. You’ll be redirected to Workspace.

-
During workspace setup, choose the built-in sample data.

hr_test database on Sample Project Instance in Test.
Step 2 - Configure SQL Review
- Navigate to CI/CD > SQL Review and click + Create SQL review.
-
Name the policy, select
Sample Template, and click Next. Confirm the PostgreSQL rule Enforce “NOT NULL” constraints on columns is set to Warning, click Create, and attach the policy to Test.
Step 3 - Create a Plan
- Open the sample project, then navigate to CI/CD > Plans and click + New Plan.
-
Select
hr_teston Sample Project Instance in Test, then click Confirm. -
Add this SQL statement (or use Schema Editor for visual design):
Click Create.
-
The plan is then in
Draftstatus. Any SQL review warnings appear because Bytebase automatically checks against your configured policy. Click warnings for details. The NOT NULL rule reports thatnicknameallows null values.
Step 4 - Review and Approve
-
Fix the warning by adding
NOT NULL DEFAULT '':Click Save. The checks rerun and pass. - Click Ready for Review to submit the Plan. Its linked Issue records review and approval; the Plan continues to track the change.
-
If approval is required, wait for the reviewer identified in Review. Otherwise, review completes automatically.

Step 5 - Deploy Changes
- In the Deploy section, the Test deployment is ready after review and checks are satisfied.
- Click Run for Test, choose Run immediately, and confirm.
-
Once complete, the Plan is marked Deployed.

Next Steps
You’ve completed your first schema change. Continue with:- Move Schema Changes from Test to Prod - for environment transitions
- Deploy with Rollout Policy - for manual rollouts
- Custom Approval Flow - for adding approvers

