Schema Evolution
No migrations. Ever.
Change your SQL. OndatraSQL updates the table automatically.
No migrations. No ALTER TABLE. No manual steps.
Mental Model
Your SQL defines the schema. When the query changes, the table adapts.
Before and After
Before:
SELECT order_id, total FROM raw.orders
After:
SELECT order_id, total, currency FROM raw.orders
OndatraSQL automatically adds the new column, updates the table, and keeps existing data.
Additive Changes
Safe changes are applied automatically:
- New columns → added
- Renamed columns → detected via AST lineage
- Types widened → promoted safely (e.g.
INTEGER→BIGINT)
No rebuild needed.
Safe Type Promotions
| From | To |
|---|---|
TINYINT | SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE |
SMALLINT | INTEGER, BIGINT, FLOAT, DOUBLE |
INTEGER | BIGINT, FLOAT, DOUBLE |
BIGINT | DOUBLE |
FLOAT | DOUBLE |
Destructive Changes
If a change isn’t safe:
- Column removed
- Type narrowed
OndatraSQL rebuilds the table automatically. No manual intervention.
How It Works
- Query runs into a temp table
- Schemas compared
- Changes applied — or table rebuilt
You modify your SQL. The table follows.
Why This Matters
In most systems, schema changes require migration scripts, manual ALTER TABLE, and coordination between teams.
OndatraSQL removes all of that.
| Task | Traditional approach | OndatraSQL |
|---|---|---|
| Add column | Migration script | Update your SQL |
| Rename column | Manual ALTER | Automatic |
| Type change | Risky migration | Handled |
| Drop column | Careful coordination | Automatic rebuild |
No migrations. Ever.
Ondatra Labs