Private Branching.

MeltyBase treats your database like code. Private Branching allows you to create cryptographically isolated clones of your entire infrastructure—schema, data, and edge functions—in seconds.

The Branching Lifecycle

When a new branch is ignited, MeltyBase performs an atomic snapshot of the parent Portal environment.

Step 01

COW Snapshot

Utilizing Copy-on-Write at the storage layer to create instant, zero-cost data clones.

Step 02

PII Scrubbing

Automatic masking of sensitive fields (emails, hashes) based on Sentinel Pulse policies.

Step 03

Schema Isolation

The branch receives a unique search_path and isolated V8 compute context.

Atomic Merge Mechanics

Merging a branch back to `main` is not a simple SQL dump. It is a multi-phase coordination event handled by the Hub.

// Executing an atomic schema merge

$ melty branch merge feat-auth-v2 --dry-run

The engine performs a **Conflict Analysis** to ensure that schema changes (e.g. `ALTER TABLE`) do not violate data integrity in the parent branch.

Impact Analysis & Safety

Before any merge, MeltyBase generates an Impact Report. This identifies potentially destructive operations and suggests safety migrations.

  • Destructive: DROP COLUMN High Risk
  • Additive: CREATE INDEX CONCURRENTLY Low Risk
  • Mutation: UPDATE on >1M rows High Risk

Ephemeral Environments

Private Branching is the foundation for **Ephemeral Preview Environments**. You can spin up a full MeltyBase stack for every Pull Request, then destroy it automatically when the PR is closed, ensuring no orphaned cloud resources.

Performance Note

Branch creation overhead is sub-500ms, regardless of database size, thanks to our Go-native coordination of the storage layer.