SQL ReviewSQL Review APIEndpointPOST /v1/sql/checkServicehttps://api.bytebase.com/#bytebase.v1.SQLServiceRequesthttps://api.bytebase.com/#bytebase.v1.CheckRequestResponsehttps://api.bytebase.com/#bytebase.v1.CheckResponse The SQL Review API provides SQL checks based on your schema review policy. Before you start, you should configure the SQL Review Policy. curl -X POST http://bytebase.example.com/v1/sql/check \ -H 'Authorization: Bearer '${bytebase_token} \ -d '{ "statement": "ALTER TABLE \"user\" ADD \"address\" integer; ALTER TABLE \"user\" DROP COLUMN \"age\";", "database": "instances/prod-instance/databases/example" }' { "advices": [ { "status": "ERROR", "code": 105, "title": "schema.backward-compatibility", "content": "\"ALTER TABLE \"user\" DROP COLUMN \"age\";\" may cause incompatibility with the existing data and code", "line": 1, "column": 0, "detail": "" }, { "status": "WARNING", "code": 402, "title": "column.no-null", "content": "Column \"address\" in \"public\".\"user\" cannot have NULL value", "line": 1, "column": 0, "detail": "" } ] }Edit this page on GitHubPrevious articleCI IntegrationNext articleOverview