Releases: cakephp/migrations
CakePHP Migrations 4.4.2
CakePHP Migrations 4.4.1
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
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
- Start update for php 8.4 by @markstory in #729
- Use actual Migrations version in builtin backend doc by @MasterOdin in #733
- update stan by @LordSimal in #734
- 4.next: add PHPUnit 11 support by @LordSimal in #736
- Make builtin the default migrations backend by @markstory in #738
Full Changelog: 4.3.2...4.4.0
CakePHP Migrations 4.3.2
What's Changed
- Add datetime column support to addTimestamps() by @markstory in #721
- Check for potentially undefined command line argument by @markstory in #726
- Add getDecoratedConnection to 4.x by @markstory in #732
Full Changelog: 4.3.1...4.3.2
CakePHP Migrations 4.3.1
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
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
- Get started on PhinxAdapter by @markstory in #679
- Get Environment tests passing with migrations engine by @markstory in #682
- Get manager tests passing with new backend by @markstory in #684
- Import Config and wire it into Manager and Environment by @markstory in #685
- Add config switch for backend selection. by @markstory in #686
- Start implementing commands using builtin backend by @markstory in #688
- Trim down Config and Manager classes to remove unused behavior by @markstory in #689
- Update to use cake connections pt1 by @markstory in #690
- Update Adapter classes to use Connection pt1 by @markstory in #694
- Remove Symfony/Console from Manager and Adapter by @markstory in #695
- Add new Migrate command by @markstory in #697
- Add Dump command for new backend by @markstory in #698
- Add schema lock file generation to migrate command by @markstory in #699
- Add Mark migrated command by @markstory in #700
- Add rollback command by @markstory in #701
- Expand test coverage for migration events. by @markstory in #702
- Add seed command by @markstory in #703
- Add
migrations create
alias with new backend by @markstory in #704 - Add docs on the intended upgrade process. by @markstory in #705
- Migrations builtin backend by @markstory in #706
- Convert FeatureFlags to Configure operations by @markstory in #707
- Add test covering mark_migrated and plugins by @markstory in #709
- Add
migrations --help
command by @markstory in #710 - Align postgres build config with no-phinx by @markstory in #712
- 696 - Fix table method to add the table to array as phinx does by @ajibarra in #711
- Cleanup by @markstory in #713
- Merge in 'builtin' backend to 4.x by @markstory in #714
Full Changelog: 4.2.0...4.3.0
CakePHP Migrations 4.2.0
What's Changed
- Fixed initial snapshot does not define collation info by @rrd108 in #653
- Warning added for baking a migration with no valid action prefix by @rrd108 in #655
- 4.x: add fulltext index support to snapshot by @LordSimal in #657
- Phinx v0.16 comp. by @dereuromark in #683
- Don't pluralize table name when baking seeds by @fabian-mcfly in #691
New Contributors
- @amayer5125 made their first contribution in #646
- @rrd108 made their first contribution in #653
- @fr3nch13 made their first contribution in #658
- @fabian-mcfly made their first contribution in #691
Full Changelog: 4.1.0...4.2.0
CakePHP Migrations 4.1.1
Changes
- Support latest Phinx 0.15.3
CakePHP Migrations 4.1.0
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
- Support phinx 0.15 requirement by @othercorey in #638
- Support phinx 0.15.2 by @othercorey in #642
- 4.x - Fix snapshot migration tests and index generation by @ndm2 in #628
- #633 Quote schema for PostgreSQL in the CakeAdapter by @pabloelcolombiano in #635
- Fix MigrationHelper.php throwing Exception by @harikt in #639
- bake migration_diff now supports --source for multiple database configs by @telepathPiddlingAccent in #618
- 4.x - Fix diff baking tests. by @ndm2 in #644
New Contributors
- @telepathPiddlingAccent made their first contribution in #618
Full Changelog: 4.0.2...4.1.0
CakePHP Migrations 4.0.2
What's Changed
- Bump actions/checkout from 3 to 4 by @dependabot in #632
- adjustments to make 4.x docs deploy work by @LordSimal in #637
- Critical bug with composer.json by @harikt in #640
- Fix the input interface by @harikt in #641
Full Changelog: 4.0.1...4.0.2