Skip to content

Releases: cakephp/phinx

0.16.3

07 Sep 07:52
b5dab99
Compare
Choose a tag to compare

Features

Bug Fixes

Documentation

Misc

  • Consolidate insert/bulkInsert implementations by @MasterOdin in #2300
  • DRY info output for console commands by @MasterOdin in #2302
  • Fix phpcs error in PDOAdapter by @MasterOdin in #2308
  • Move schema to class property for PostgresAdapter by @MasterOdin in #2309
    Note: The PostgresAdapter::getGlobalSchemaName protected function has been removed. Use the PostgresAdapter::$schema class member variable instead.

New Contributors

Full Changelog: 0.16.2...0.16.3

0.16.2

22 Jul 22:01
5779080
Compare
Choose a tag to compare

Features

Bug Fixes

Documentation

New Contributors

Full Changelog: 0.16.1...0.16.2

0.16.1

04 Jun 03:36
6e522d6
Compare
Choose a tag to compare

Features

Bug Fixes

Miscellaneous

New Contributors

Full Changelog: 0.16.0...0.16.1

0.16.0

24 Jan 05:25
e039a72
Compare
Choose a tag to compare

Breaking Changes

  • Validate datetime for version by @dereuromark in #2249
    When using AbstratMigration class, when it's instantiated, the version will be validated that it is 14 characters (YYYYMMDDHHmmSS). A future version may strengthen this to validate that it's a valid datetime. To get prior behavior, will need to extend the AbstractMigration class and either override the constructor or the new validateVersion method.
  • Fix inconsistencies with hasPrimaryKey by @DrewKolstad in #2228
    Previously hasPrimaryKey would return inconsistently if the passed array of columns was a subset/superset of actual primary keys. This function should now only return true iff the passed array of columns strictly matches the actual list of primary key columns (same length and values). Postgres and SQLServer are case sensitive, while MySQL and SQLite are case insensitive.

Fixes

Docs

Misc

New Contributors

Full Changelog: 0.15.5...0.16.0

0.15.5

18 Dec 13:54
a81c084
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.15.4...0.15.5

0.15.4

15 Nov 16:12
192e7f7
Compare
Choose a tag to compare

Fixes

Note: Columns created in Sqlite before 0.15.4 using the PdoAdapter::PHINX_TYPE_BINARYUUID type were binary_blob. In 0.15.4 they were changed to be type uuid_blob. If you rely on this constant, you will need to manually update the types of any columns using PdoAdapter::PHINX_TYPE_BINARYUUID to the new value.

Note: binary(16) support for Sqlite inside CakePHP requires v5.0.3+.

New Contributors

Full Changelog: 0.15.3...0.15.4

0.15.3

09 Nov 19:53
Compare
Choose a tag to compare

Fixes

Docs

New Contributors

Full Changelog: 0.15.2...0.15.3

0.15.2

22 Sep 18:39
26753bd
Compare
Choose a tag to compare

Fixes

  • Allow Table::addColumn() to use type from Column object again by @othercorey in #2224

Full Changelog: 0.15.1...0.15.2

0.15.1

21 Sep 21:32
acda135
Compare
Choose a tag to compare

Fixes

  • Ensure PostgresAdapter::useIdentity is always initialized by @othercorey in #2223

Full Changelog: 0.15.0...0.15.1

0.15.0

19 Sep 09:27
a1c4ec5
Compare
Choose a tag to compare

Note: The 2.0.0, 2.0.1, and 2.0.2 tags were created incorrectly, and have been deleted and will be removed from packagist. This release features all of the same features and changes that was in those releases. We are still using 0.x releases as the API is not yet considered stable, as evidenced by the breaking change below.

Breaking Changes

PHP 8.1 / Type declarations

This release requires PHP 8.1 or greater to be installed to use Phinx. As part of this, a number of type declarations were changed throughout Phinx to take advantage of the expanded syntax allowed by PHP 8.1. See #2218 for all the files affected.

For users that overwrite $autoId in their migration class, this will now need a bool type declaration:

public bool $autoId = false;

Foreign Key Handling

In previous versions, Phinx was inconsistent with how it handled foreign keys across the adapters. Per #2212, here is the old and new behaviors:

Currently the behavior looks like this:

MySQL Postgres Sqlite SQL Server
Case-sensitive drop no yes yes no¹
Case-sensitive lookup yes yes no yes¹
Multi-column drop no² yes no³ no²
Drop all column matches yes yes no yes
Column order dependent drop no no no no
Column order dependent lookup yes no no no
Silently drop non-existent by columns no yes no yes
Silently drop non-existent by name no no - no

1) In a case sensitive database the query would produce an error.
2) Generates duplicate drop instructions, one for every key that has any of the given columns.
3) For every column, the first key that starts with that column would be deleted.

With these changes, the new behavior would be as follows:

MySQL Postgres Sqlite SQL Server
Case-sensitive drop no yes¹ no yes¹
Case-sensitive lookup no yes¹ no yes¹
Multi-column drop yes yes yes yes
Drop all column matches yes yes yes yes
Column order dependent drop yes yes yes yes
Column order dependent lookup yes yes yes yes
Silently drop non-existent by columns no no no no
Silently drop non-existent by name no no - no

1) The behavior is independent of whether the database/column is actually case-sensitive.

Features

Docs

New Contributors

Full Changelog: 0.14.0...0.15.0