Blueprints Blog Contact About

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. INTEGERBIGINT)

No rebuild needed.

Safe Type Promotions

FromTo
TINYINTSMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE
SMALLINTINTEGER, BIGINT, FLOAT, DOUBLE
INTEGERBIGINT, FLOAT, DOUBLE
BIGINTDOUBLE
FLOATDOUBLE

Destructive Changes

If a change isn’t safe:

  • Column removed
  • Type narrowed

OndatraSQL rebuilds the table automatically. No manual intervention.

How It Works

  1. Query runs into a temp table
  2. Schemas compared
  3. 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.

TaskTraditional approachOndatraSQL
Add columnMigration scriptUpdate your SQL
Rename columnManual ALTERAutomatic
Type changeRisky migrationHandled
Drop columnCareful coordinationAutomatic rebuild

No migrations. Ever.