Skip to content

Releases: cakephp/migrations

CakePHP Migrations 4.5.0

24 Nov 03:19
32afa21
Compare
Choose a tag to compare

This release introduces new base classes for migrations - Migrations\BaseMigration, and seeds Migrations\BaseSeed. These new base classes will be used in newly generated migrations, snapshots and diffs if the builtin backend is enabled. These base classes are not compatible with phinx, and represent the forwards compatible path for applications.

In a future cakephp/upgrade release a rector rule will be added to change existing migrations to the new base classes.

What's Changed

Full Changelog: 4.4.2...4.5.0

CakePHP Migrations 4.4.2

08 Oct 14:23
40b5ef9
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 4.4.1...4.4.2

CakePHP Migrations 4.4.1

16 Sep 15:17
d39616f
Compare
Choose a tag to compare

What's Changed

  • Correcting getGlobalSchemaName to use the correct schema by @challgren in #728
  • Disable foreign key checks when removing temp tables by @markstory in #743
  • Add hook method for migrations to skip creating a transaction by @markstory in #745
  • Fix compatibility break from phinx by @markstory in #748

Full Changelog: 4.4.0...4.4.1

CakePHP Migrations 4.4.0

23 Aug 21:40
6047ee0
Compare
Choose a tag to compare

Default backend update

Following the addition of the builtin backend in 4.3.0, the builtin backend is now the default in 4.4.0. If your migrations don't run correctly with 4.4.0 please open an issue. You can temporarily switch back to the phinx backend by setting Migrations.backend = 'phinx' in your config/app.php.

The phinx backend is planned for removal in the 5.0 release which will follow 4.4 after collecting feedback from the community for a few months.

What's Changed

Full Changelog: 4.3.2...4.4.0

CakePHP Migrations 4.3.2

30 Jul 14:42
ff26043
Compare
Choose a tag to compare

What's Changed

Full Changelog: 4.3.1...4.3.2

CakePHP Migrations 4.3.1

13 May 15:48
c3eef97
Compare
Choose a tag to compare

What's Changed

  • Handle database with escapable identifiers in name by @jharder in #717
  • Include the current backend in the entry point output by @markstory in #718

New Contributors

Full Changelog: 4.3.0...4.3.1

CakePHP Migrations 4.3.0

03 May 03:24
fa055cc
Compare
Choose a tag to compare

New Backend

As of migrations 4.3. there is a new migrations backend that uses CakePHP's database abstractions and ORM. Longer term this will allow for phinx to be removed as a dependency. Reducing the dependencies of migrations helps keep your applications dependencies smaller. Migrations can also benefit from improvements in the ORM with less lag time as they no longer need to be re-implemented in phinx. Lastly, it streamlines the number of APIs you have to learn. Migrations included APIs that are very different from CakePHPs, and we can now align querying and data manipulation APIs so that you don't have to remember two different APIs depending on the context.

What is the same?

Your migrations shouldn't have to change much to adapt to the new backend. The migrations backend implements all of the phinx interfaces and can run migrations based on phinx classes. If your migrations fail for a reason not outlined below please open an issue.

What is different?

If your migrations are using the AdapterInterface to fetch rows or update rows you will need to update your code. If you use Adapter::query() to execute queries, the return of this method is now Cake\Database\StatementInterface instead. This impacts fetchAll(), and fetch().

Enabling the new backend

The new backend can be enabled through application configuration. Add the following to your config/app.php::

    return [
        // Other configuration.
        'Migrations' => ['backend' => 'builtin'],
    ];

If your migrations have problems running with the builtin backend, removing this configuration option will revert to using phinx.

Summary of pull requests

Full Changelog: 4.2.0...4.3.0

CakePHP Migrations 4.2.0

02 Mar 01:26
2a5f996
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 4.1.0...4.2.0

CakePHP Migrations 4.1.1

11 Nov 03:29
Compare
Choose a tag to compare

Changes

  • Support latest Phinx 0.15.3

CakePHP Migrations 4.1.0

23 Sep 01:20
7659d42
Compare
Choose a tag to compare

This release fixes dependencies after the invalid Phinx 2.0 release was rolled back and Phinx 0.15 released instead.

Along with Phinx support, this fixes and improves index generation that was hidden behind disabled tests. You can find more information on that here: #628.

What's Changed

New Contributors

Full Changelog: 4.0.2...4.1.0