yiisoft/db-migration
Database migration toolkit for Yii applications built on yiisoft/db. Create, apply, and revert schema changes with versioned migration history, console commands, configurable migration paths, and support for multiple database drivers. Track applied migrations and manage schema evolution from the com...
--db selector directly enable per-tenant or per-shard schema evolution — a concrete enabler for scaling decisions rather than a rewrite.migrate:mark lets teams adopt the tool against an already-live schema by stamping the current version without re-running migrations. This lowers the adoption cost for brownfield products and reduces migration-window risk.--transactional / --no-transactional lets PMs set an explicit data-safety posture per environment (e.g., non-transactional for implicit-commit engines like MySQL DDL), reducing "half-applied migration" incidents.Consider adopting when:
migrate:mark).Look elsewhere when:
Caveat: 2.2.0 is additive — no breaking changes or deprecations identified — so incremental adoption is low-risk.
For executives: This release strengthens our database change-management story at effectively no migration cost. It adds multi-database support (directly relevant to our multi-tenant/scaling roadmap), a safe way to onboard existing production databases, and configurable transaction safety to reduce incident risk. The upgrade is backward compatible — additive features only — so it is a low-risk, low-effort improvement to operational reliability.
For engineering: Version 2.2.0 delivers three capabilities we have been working around: (1) named databases with separate migration histories and a --db selector — removes custom multi-tenant scripts; (2) migrate:mark — lets us baseline live schemas instead of hand-editing history tables; (3) configurable transaction mode with CLI overrides — gives us per-environment DDL safety policy. Plus a clearer first-run error. No breaking changes; upgrade and validate against our multi-DB environments. Recommendation: upgrade and pilot migrate:mark on a staging copy of an existing database before the next release train.
How can I help you explore Laravel packages today?