| title | First Schema Change in 5 Minutes |
|---|---|
| author | Adela |
| tags | Tutorial |
| updated_at | 2024/10/10 20:00 |
| integrations | General |
| category | UI-Driven Workflow |
| level | Beginner |
| estimated_time | 5 mins |
| featured | true |
import PreparationWithSampleData from '/snippets/tutorials/preparation-with-sample-data.mdx';
Learn Bytebase's schema change workflow using sample databases.
-
Navigate to CI/CD > SQL Review and click + Create SQL review.
-
Select
Sample Template(19 enabled rules), click Next. Attach toProdenvironment and confirm.
-
Navigate to CI/CD > Plans and click + New Plan.
-
Select both databases where changes will be applied:
hr_testonTest Sample instancehr_prodonProd Sample instance
Click Confirm to proceed.
-
Add this SQL statement (or use Schema Editor for visual design):
ALTER TABLE public.employee ADD COLUMN IF NOT EXISTS nickname TEXT;
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.
-
Fix the warning by adding
NOT NULL DEFAULT '':ALTER TABLE public.employee ADD COLUMN IF NOT EXISTS nickname TEXT NOT NULL DEFAULT '';
Click Save. The checks rerun and pass.
-
Click Ready for Review to convert the plan into an issue and submit for approval.
-
In the Rollout section, both Test and Prod deployments are ready.

-
Click Run for Test, then for Prod after success.
-
Once complete, the issue is marked
Done.
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

