DbDeployFoundation · migrations

Keep your database in sync with the code

Melis DbDeploy finds each module’s SQL deltas, applies the ones not yet run, and records what’s been applied — so the schema always matches the installed code.

Live demo
dbdeploy — migration runner
// On install / update, DbDeploy applies a module's
// un-run SQL deltas:
//     install/dbdeploy/*.sql
// and records each one so it never runs twice.
Applies deltasinstall/dbdeploy/*.sql
Run onceNever twice

Package

melis-dbdeploy

Role

Foundation

UI

None — headless

Runs

SQL deltas

Idempotent

Yes

Depends on

phing (standalone)

Overview

Schema, always in sync

You never open DbDeploy — it’s the reason the database stays in sync with the code. When you install a module that needs new tables or columns, DbDeploy runs its SQL migration scripts so they exist.

When you update a module, it runs only the new scripts — never the same change twice, never a missing one. A freshly installed/updated module that errors with ‘table or column not found’ usually has an un-run migration.

Key features

How migrations stay reliable

It finds the deltas, applies only what’s un-run, and records each one — safely, in order, every time.

Finds module deltas

Locates each module’s install/dbdeploy/*.sql scripts.

Applies only un-run scripts

Runs the deltas not yet applied — never twice.

Records migrations

Tracks what’s been applied so nothing is missed.

Idempotent & ordered

Safe to re-run; scripts apply in order.

Standalone

A low-level tool depending only on phing.

Driven automatically

The installer and Marketplace trigger it on install/update.

See it in action

Only the new scripts run

Update a module and DbDeploy applies just the deltas it hasn’t seen — recording each one as it goes.

dbdeploy — only new scripts
// Update a module → only the NEW deltas run:
//   V3__add_column.sql   ✓ already applied — skipped
//   V4__new_table.sql    → applied now
//   V5__index.sql        → applied now
// Each is recorded; re-running changes nothing.
TrackedApplied once
Migrations

Only the new scripts run

It tracks what’s been applied, so updating a module runs just the new deltas — never the same change twice.

  • install/dbdeploy/*.sql
  • Applies un-run deltas
  • Records each migration

For developers

How it's wired

Phing-based

A low-level runner built on phing; no Melis Core dependency.

Driven by install/update

The installer, Marketplace and module flows trigger it.

Part of the foundation

Asset Manager, DbDeploy, ComposerDeploy and the Installer sit beside Melis Core.

// Standalone runner (phing): driven by the installer and
// Marketplace. It guarantees the DB schema matches the
// installed module code — applying each delta exactly once.

Part of Melis Platform

Explore the rest of the platform

Melis DbDeploy is part of the foundation — here are the modules it works alongside.

Migrations that just work

See how the platform keeps its schema in sync.