github cakephp/migrations 5.0.0
Migrations 5.0

10 hours ago

Fully refactored major with zero dependencies outside CakePHP code.

Breaking Changes

  • Phinx fully removed - The library no longer depends on Phinx. All functionality is now native to CakePHP Migrations.
  • Requires CakePHP 5.3+
  • Integer columns now default to signed - Use explicit 'signed' => false for unsigned columns
  • Unified migrations table - New cake_migrations table name (auto-detects legacy phinxlog for BC)

New Features

  • Seed tracking - Seeds now track execution state in cake_seeds table, preventing accidental re-runs
  • Upsert operations - insertOrUpdate() and insertOrSkip() methods for seeds
  • Check constraints - Add CHECK constraints to columns
  • Table partitioning - MySQL and PostgreSQL partition support via partitionBy()
  • MySQL ALTER optimizations - ALGORITHM and LOCK options for zero-downtime schema changes
  • Default value expressions - Support for CURRENT_DATE, CURRENT_TIME, etc. as defaults
  • Bake improvements - Default value syntax support in migration bake commands

API Improvements

  • Short seed names - Use Users instead of UsersSeed everywhere
  • Seeds as command argument - bin/cake seeds run User instead of --seed User
  • --fake flag - Mark seeds as executed without running them
  • Consistent use of CakePHP Database classes (Column, Index, ForeignKey)

For details see docs and migration guide.

Full Changelog: 4.9.4...5.0.0

Don't miss a new migrations release

NewReleases is sending notifications on new releases.