Database Support
Supported:- PostgreSQL
- MySQL
- SQL Server
- Oracle
- MongoDB
- Other databases
Supported SQL Statements
Only these PostgreSQL statements are supported:CREATE TABLECREATE INDEX/CREATE UNIQUE INDEXCREATE VIEWCREATE SEQUENCECREATE FUNCTIONALTER SEQUENCE(for OWNED BY)
- Complex stored procedures
- Triggers
- Row-level security policies
- DML operations (INSERT, UPDATE, DELETE)
- Transaction control
- Database-level settings
Strict Syntax Requirements
SDL requires strict adherence to conventions:-
All objects must use fully qualified names (with schema prefix)
-
PRIMARY KEY, UNIQUE, FOREIGN KEY, CHECK must be table-level with explicit names
-
Only NOT NULL, DEFAULT, GENERATED allowed at column level
-
Foreign key references must be fully qualified
-
All indexes must have explicit names
No Direct Data Operations
SDL only manages schema structure. For data operations, use migration-based workflow. Not supported in SDL:- INSERT statements
- UPDATE statements
- DELETE statements
- Data transformation logic
Destructive Operations
SDL-generated DROP statements execute automatically when objects are removed from files:Always backup data before deploying SDL changes that remove objects from schema files. Bytebase
will automatically drop those objects.
Limited Rollback
SDL only moves forward to new desired states:- No automatic rollback generation
- To rollback: revert SDL files to previous state and redeploy
- Data in dropped objects is lost (backup required)
Schema Rollback Strategies
Approaches for reversing schema changes
Performance Considerations
For large schemas:- Initial SDL adoption requires exporting complete schema
- State comparison time increases with schema complexity
- DDL generation uses topological sort (handles dependencies)
- Organize schema into multiple files
- Use database groups for fleet management
- Test SDL workflow on staging first

