Skip to content

Releases: cakephp/migrations

Migrations 5.1.1

19 Apr 11:27
d996bd9

Choose a tag to compare

Fixes

  • TestSuite\Migrator now treats cake_migrations as a migration metadata table alongside legacy *_phinxlog tables, so the unified migration ledger is reset during test cleanup instead of being left behind. (#1072)

Full Changelog: 5.1.0...5.1.1

Migrations 5.1.0

12 Apr 14:14

Choose a tag to compare

Improvements

  • Add support for database views and triggers. (#957)
  • Add migrations reset command. (#1051)
  • Add fluent Table API for check constraints. (#1052)
  • Add ALGORITHM/LOCK support to Index operations. (#1057)
  • Raise PHPStan level to 8 with null safety fixes. (#1044)

Fixes

  • Fix property types related to CakePHP 5.4 changes. (#1067)

Full Changelog: 5.0.4...5.1.0

Migrations 5.0.4

29 Mar 13:04
e9baed9

Choose a tag to compare

What's Changed

  • improve error message if a migration contains the old base migration class by @LordSimal in #1059
  • Fix checkSync() to only consider migrations from current context by @dereuromark in #1061

Full Changelog: 5.0.3...5.0.4

Migrations 5.0.3

12 Mar 21:11
c8cfb93

Choose a tag to compare

What's Changed

⚠️ Potential Breaking Change

Foreign Key Constraint Naming: When using addForeignKey() without an explicit constraint name, migrations now auto-generates names using the pattern {table}_{columns} instead of letting the database generate names (e.g., articles_ibfk_1 on MySQL). This provides consistent naming across all database adapters but may affect rollbacks in existing migrations that reference constraints by their old names. See the upgrade documentation for details.

Full Changelog: 5.0.2...5.0.3

Migrations 5.0.2

07 Mar 18:41
612764c

Choose a tag to compare

What's Changed

Full Changelog: 5.0.1...5.0.2

Migrations 4.9.6

24 Feb 14:18
7268aba

Choose a tag to compare

What's Changed

  • Fix dump command error when migrations directory does not exist by @dereuromark in #1009
  • Add runtime deprecation warnings for AbstractMigration and AbstractSeed by @dereuromark in #1006
  • Fix column collation not applied for uuid type by @dereuromark in #1025

Full Changelog: 4.9.5...4.9.6

Migrations 5.0.1

18 Feb 02:12
47a7501

Choose a tag to compare

What's Changed

Full Changelog: 5.0.0...5.0.1

Migrations 5.0.0

21 Jan 04:12

Choose a tag to compare

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

Migrations 4.9.5

21 Jan 04:04
94500da

Choose a tag to compare

What's Changed

Full Changelog: 4.9.4...4.9.5

Migrations 4.9.4

18 Jan 16:32
d0f5e3c

Choose a tag to compare

What's Changed

Full Changelog: 4.9.3...4.9.4