Phinx Versions Save

PHP Database Migrations for Everyone

0.13.2

1 year ago

Fixes

New Contributors

Full Changelog: https://github.com/cakephp/phinx/compare/0.13.1...0.13.2

0.13.1

1 year ago

Fixes

  • Fix target being set to 0 if omitted when running migrate by @nrob81 in #2115
  • Fix deprecation warning on return value for Config::offsetGet by @MasterOdin in #2117

Full Changelog: https://github.com/cakephp/phinx/compare/0.13.0...0.13.1

0.13.0

1 year ago

Breaking Changes

  • set column null by default unless identity by @MasterOdin in #1872. Previously columns were created as NOT NULL by default, and to now get that behavior, you will need to explicitly pass 'null' => false in the column options.
  • remove remove $direction argument to preFlightCheck and postFlightCheck (use isMigratingUp property) by @MasterOdin in #1892
  • make utf8mb4 default charset and collation for new mysql tables by @MasterOdin in #1875 (Set charset and collation setting in phinx.php to utf8mb3 for prior behavior)
  • make default PKs for mysql unsigned by default by @MasterOdin in #1899. When defining foreign keys, you will need to now need to set $signed => false. To restore prior behavior, pass $signed => true when defining the default PK.
  • Add type hints to codebase by @MasterOdin in #1995 (This does not affect the up, down, or change methods for AbstractMigration. If you extend from phinx, you will need to add type hinting to your code)
  • remove deprecated hasSchemaTable function from AdapterInterface by @MasterOdin in #1877
  • remove deprecated insert, dropTable methods from MigrationInterface by @MasterOdin in #1878
  • Do not set code when recasting PDOException when connecting to DB by @MasterOdin in #2101
  • Implement identity in PostgresAdapter by @ajibarra in #2085 (identity columns for postgres 10+ will now be generated as INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY instead of SERIAL NOT NULL)

Deprecations

  • Deprecate the default_migration_table config setting, use migration_table instead by @MasterOdin in #1961

New Features

  • add createSchema and dropSchema methods on MigrationInterface by @MasterOdin in #1871

Improvements

  • remove check on column type for setting collation / encoding by @Masterodin in #1881
  • trigger deprecation notice when using default_database by @MasterOdin in #1890 (function had been marked as deprecated in 0.12.0)
  • add support for smallserial alias for postgres by @MasterOdin in #1915 (note, using smallinteger on an identity column will now use the type smallserial)
  • allow setting migration_table per environment by @MasterOdin in #1961
  • Add new shouldExecute method to AbstractMigration and AbstractSeed by @AdrienPoupa in #1939
  • Add for geometry column type to SqlServerAdapter by @tedce in #1969
  • Add optional $params argument to query/execute adapter methods to allow usage of prepared queries by @MasterOdin in #1962
  • Allow specifying template style for create command by @MasterOdin in #2013 (note, the name of the base migration file has changed, argument has changed for AbstractCommand::getMigrationTemplateFilename)
  • Improve associative array phpdocs by @dereuromark in #2034
  • Pass environment to seed from manager by @martenb in #2102 (note, parameter change to Manager::getSeeds method)

Full Changelog: https://github.com/cakephp/phinx/compare/0.12.13...0.13.0

0.12.13

1 year ago

Fixes

  • Fix defaultName deprecation warning on symfony/console 6.1 by @MasterOdin in #2107

Full Changelog: https://github.com/cakephp/phinx/compare/0.12.12...0.12.13

0.12.12

1 year ago

Fixes

Full Changelog: https://github.com/cakephp/phinx/compare/0.12.11...0.12.12

0.12.11

1 year ago

Improvements

Full Changelog: https://github.com/cakephp/phinx/compare/0.12.10...0.12.11

0.12.10

2 years ago

Fixes

  • Fixed setting default for Blob, Geometry, Json, and Text for MySQL 8+
  • Fix using MysqlAdapter::INT_* constants as column limit
  • Properly return limit for MySQL columns that include it (e.g. smallint(5))
  • Fix adding columns to sqlite tables created externally from phinx

Improvements

  • Do not print information output with option --no-info
  • Remove decimal from unsupported sqlite types list
  • Mark compatibility with Symfony 6.x

0.12.9

2 years ago

Fixes

  • Fixed renaming table not using prefix/suffix on new name
  • Fixed changing boolean column option's in PostgreSQL, this was a regression of previous release patch that is now resolved

Improvements

  • PHP 8.1 compatibility

0.12.8

2 years ago

Fixes

  • Fixes issue with MySQL Adapter primary key getter

Improvements

  • Expose hasPrimaryKey() method in Table object. This mirrors the existing hasForeignKey() function.
  • Postgres: Allow change from int to bool and char to uuid
  • Allow setting column to false to ignore it in addTimestamps()/addTimestampsWithTimezone methods. This is useful if not both fields are used.
  • Adding the mediumint type for the MySql adapter

0.12.7

3 years ago

Fixes

  • Fixed error when creating a foreign key on a table without an autoincrementing primary key in SQLite

Improvements

  • Support for psr/container v2