Skip to main content
Bytebase reviews the SQL of a database change before it rolls out, in two ways:
  • SQL Review Rules check each statement against rules you turn on for each database engine, such as “every table needs a primary key”. The same SQL always gets the same result.
  • AI SQL Review adds a review by your configured AI model, which reads the statements together with the target database’s schema and statistics to look for risks in the change. It follows a review policy you can customize in plain language.
Both run on the plan, and their results appear side by side under Automated review in the plan’s Review section. You configure both in the workspace sidebar under CI/CD > SQL Review. Use SQL Review Rules for checks that must give the same result every time, and add AI SQL Review for a broader review that follows a policy you customize in plain language.

SQL Review Rules

Create a SQL Review policy and attach it to environments or projects.

AI SQL Review

Turn on AI SQL Review and write your own review policy.
For how checks fit into the change workflow and how they differ from human approval, see SQL Review concepts.