The changes of each release that this documentation covers, newest first. The source is CHANGELOG.md of the repository.
5.0.0 (2026-11-30)
Added
- Added the
namespaceoption (--namespaceandapplication.namespace) to generate migration classes in a namespace (#41) - Added the
log-pathoption (--log-pathandapplication.log-path) for the path of the file log (#5) - Added the
charsetkey of thedatabaseconfiguration (MySQL), with the defaultutf8mb4. Before, the connection always usedutf8(#254) - Added the column option
onUpdatefor MySQLON UPDATE CURRENT_TIMESTAMP(#258) - Added the column option
defaultExpressionfor a PostgreSQL default that is an expression, for examplegen_random_uuid()(#113) - Added the
cleanaction to drop the tables or delete their data, and the adapter methodsdropTables()andemptyTables()(#72) - Added the
exportaction to show the SQL of the schema of the migration files at a version, the adapter methodgetCreateTableSql()andMigration::getTableDefinition()(#25) - Added the
log-tableoption (--log-tableandapplication.log-table) for the name of the log table (#60) - Added the
truncateoption (--truncateandapplication.truncate) forrun, to empty each table beforebatchInsert()imports its data (#83) - Added the column comments on PostgreSQL. Before, the comments were read but not written (#89)
- Added the MySQL
SETcolumn type (Column::TYPE_SET) (#155) - Added the MySQL
ROW_FORMATto the generated table options (#125) - Added
ItemCollection::compare()to compare two versions (#269) - Added
Generate::getCode()andMigration::isClassFile().Generate::getEntity()now gives only the header of the file (#87) - Added the
import-logaction (andMigrations::importLog()) to copy the file log into the empty log table of the database (#59)
Fixed
- Fixed
generatewriting the numeric precision as the size of MySQL integer columns (#139) - Fixed a MySQL
TYPE_BOOLEANcolumn with a size givingTINYINT(1)(3), and the table morph changing the integer columns on each run (#218) - Fixed PostgreSQL
uuidcolumns read asTYPE_VARCHAR; addedColumn::TYPE_UUID. Generate again the migration files of tables withuuidcolumns (#105) - Fixed a new table on PostgreSQL and SQLite getting only its primary key, with no other indexes (#221)
- Fixed
batchDelete()failing on a table with noidcolumn, andbatchInsert()leaving its transaction open after an error (#223) - Fixed
generatewriting values into the migration file with no escaping (#225) - Fixed the table morph failing to drop a column that has a foreign key (#6)
- Fixed an absolute
--configpath getting the project directory in front of it, a missing configuration file loading as an empty configuration, and the configuration example of the README (#21) - Fixed
generatewriting'size' => 1for JSON and JSONB columns, changing enum values that have a comma or a quote, and leaving out theCURRENT_TIMESTAMPdefaults (#155) - Fixed
listColumns()on MySQL and PostgreSQL giving a column more than one time when the column is in more than one key (#235) - Fixed the MySQL table morph changing the primary key column and each
ENUMandSETcolumn on each run (#237) - Fixed the PostgreSQL table morph changing each
SERIALcolumn on each run, anddropIndex()not dropping the index (#239) - Fixed the foreign keys to a table in another schema, and the composite foreign keys (#241)
- Fixed a short version getting one part too many (
1.1gave1.1.0.0), and the versions of a second migrations directory being lost ingenerateandlist(#243) - Fixed
generatewith--datawriting the data of the log table (#245) - Fixed the help: it did not list the
--skip-ref-schemaand--skip-foreign-checksoptions (#247) - Fixed a new SQLite table getting no foreign keys (#249)
- Fixed
generate --dryexporting the data, andrun --dryrunning the migrations (#252) - Fixed the database log turning off the MySQL foreign key checks on its own connection (#254)
- Fixed
composer.jsonhaving the version4.0.0after the release ofv4.0.1; theversionfield is removed (#256) - Fixed the last foreign key or index of a table staying in the database (#227)
- Fixed
migrate-files --dry-run=falsemaking a dry run (#82) - Fixed SQLite tables created from a generated migration file having no primary key and no
AUTOINCREMENT. Generate again the SQLite versions that create tables (#267) - Fixed the order of incremental versions:
1.0.10and1.1.0, and1.0.0and1.0.0.1, are now two versions. Before, only one of them ran (#269) - Fixed the banner and the error messages going to stdout, so the output of
exportwas not valid SQL, and the help of--skip-foreign-checksand--log-path(#273) - Fixed
generateon MySQL 8.0 writing an empty or oldAUTO_INCREMENTvalue (#275) - Fixed
generate --versionmaking a second directory for the same version with another name, for example1.0.0.0next to1.0.0, and--forcegiving a PHP warning (#277) - Fixed
listTables()giving the SQLite internal tables and the PostgreSQL tables of an extension (#279) - Fixed the database log for a second call in one process, for
import-logwith noConfig, and for alog-tablename in another case on MySQL and SQLite (#59) - Fixed a boolean key of the configuration with a text value, for example
"false", beingtrue(#282) - Fixed the SQLite table morph failing to add a column with a position (
FIRSTorAFTER) (#284) - Fixed the rename of a column in the table morph on SQLite and PostgreSQL (#285)
- Fixed a SQLite primary key of more than one column losing the order of its columns (#286)
Changed
- Changed the configuration and CLI names to one kebab-case name for each setting:
migrations,log-in-db,ts-basedandexport-data-from-tables. The old names give a deprecation notice; 6.0 removes them (#82) - Changed the CLI options to win over the configuration for each setting. A boolean option takes
=falseto turn off a value of the configuration (#82) - Changed
generateto create no version when no table changed (#16) - Changed the table morph to compare the
onUpdateof a column. Generate again the versions that did not run yet (#258) - Changed the table morph to compare the
CURRENT_TIMESTAMPdefaults. Generate again the versions that did not run yet (#155) - Changed the table morph to compare the column comment (#89)
- Changed the generated migration files to have
declare(strict_types=1)and aTABLE_NAMEclass constant (#87, #107) - Changed the source and test files to import the global functions and constants that they use (#250)
- Changed CI to run php-cs-fixer (dry run) in the code style job on PHP 8.2 - 8.5 (#216)
- Changed the order of some versions to the order of their parts. Two versions with the same old order number, for example
1.0.10and1.1.0, can stoprunandexportwith an error (#269) - Changed the generated migration files to return an object of an anonymous class, with no class name. Old files run as before (#87)
- Changed the file log: when no setting chooses the log,
run,listandcleangive a deprecation notice; 6.0 makes the database log the default.Config::$logInDbisnullwhen the configuration does not set it (#59) - Changed CI to send the coverage to SonarQube and octocov in place of Codecov, and added the Infection setup for local runs (
composer infection) (#290)