---
title: "Changelog"
description: "The changes of each release of Phalcon Migrations 5.0."
version: "5.0"
---

> Documentation Index
> Fetch the complete documentation index at: https://migrations.phalcon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog

The changes of each release that this documentation covers, newest first. The source is [`CHANGELOG.md`](https://github.com/phalcon/migrations/blob/master/CHANGELOG.md) of the repository.

## [5.0.0](https://github.com/phalcon/migrations/releases/tag/v5.0.0) (2026-11-30)

### Added

- Added the `namespace` option (`--namespace` and `application.namespace`) to generate migration classes in a namespace ([#41](https://github.com/phalcon/migrations/issues/41))
- Added the `log-path` option (`--log-path` and `application.log-path`) for the path of the file log ([#5](https://github.com/phalcon/migrations/issues/5))
- Added the `charset` key of the `database` configuration (MySQL), with the default `utf8mb4`. Before, the connection always used `utf8` ([#254](https://github.com/phalcon/migrations/issues/254))
- Added the column option `onUpdate` for MySQL `ON UPDATE CURRENT_TIMESTAMP` ([#258](https://github.com/phalcon/migrations/issues/258))
- Added the column option `defaultExpression` for a PostgreSQL default that is an expression, for example `gen_random_uuid()` ([#113](https://github.com/phalcon/migrations/issues/113))
- Added the `clean` action to drop the tables or delete their data, and the adapter methods `dropTables()` and `emptyTables()` ([#72](https://github.com/phalcon/migrations/issues/72))
- Added the `export` action to show the SQL of the schema of the migration files at a version, the adapter method `getCreateTableSql()` and `Migration::getTableDefinition()` ([#25](https://github.com/phalcon/migrations/issues/25))
- Added the `log-table` option (`--log-table` and `application.log-table`) for the name of the log table ([#60](https://github.com/phalcon/migrations/issues/60))
- Added the `truncate` option (`--truncate` and `application.truncate`) for `run`, to empty each table before `batchInsert()` imports its data ([#83](https://github.com/phalcon/migrations/issues/83))
- Added the column comments on PostgreSQL. Before, the comments were read but not written ([#89](https://github.com/phalcon/migrations/issues/89))
- Added the MySQL `SET` column type (`Column::TYPE_SET`) ([#155](https://github.com/phalcon/migrations/issues/155))
- Added the MySQL `ROW_FORMAT` to the generated table options ([#125](https://github.com/phalcon/migrations/issues/125))
- Added `ItemCollection::compare()` to compare two versions ([#269](https://github.com/phalcon/migrations/issues/269))
- Added `Generate::getCode()` and `Migration::isClassFile()`. `Generate::getEntity()` now gives only the header of the file ([#87](https://github.com/phalcon/migrations/issues/87))
- Added the `import-log` action (and `Migrations::importLog()`) to copy the file log into the empty log table of the database ([#59](https://github.com/phalcon/migrations/issues/59))

### Fixed

- Fixed `generate` writing the numeric precision as the size of MySQL integer columns ([#139](https://github.com/phalcon/migrations/issues/139))
- Fixed a MySQL `TYPE_BOOLEAN` column with a size giving `TINYINT(1)(3)`, and the table morph changing the integer columns on each run ([#218](https://github.com/phalcon/migrations/issues/218))
- Fixed PostgreSQL `uuid` columns read as `TYPE_VARCHAR`; added `Column::TYPE_UUID`. Generate again the migration files of tables with `uuid` columns ([#105](https://github.com/phalcon/migrations/issues/105))
- Fixed a new table on PostgreSQL and SQLite getting only its primary key, with no other indexes ([#221](https://github.com/phalcon/migrations/issues/221))
- Fixed `batchDelete()` failing on a table with no `id` column, and `batchInsert()` leaving its transaction open after an error ([#223](https://github.com/phalcon/migrations/issues/223))
- Fixed `generate` writing values into the migration file with no escaping ([#225](https://github.com/phalcon/migrations/issues/225))
- Fixed the table morph failing to drop a column that has a foreign key ([#6](https://github.com/phalcon/migrations/issues/6))
- Fixed an absolute `--config` path 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](https://github.com/phalcon/migrations/issues/21))
- Fixed `generate` writing `'size' => 1` for JSON and JSONB columns, changing enum values that have a comma or a quote, and leaving out the `CURRENT_TIMESTAMP` defaults ([#155](https://github.com/phalcon/migrations/issues/155))
- Fixed `listColumns()` on MySQL and PostgreSQL giving a column more than one time when the column is in more than one key ([#235](https://github.com/phalcon/migrations/issues/235))
- Fixed the MySQL table morph changing the primary key column and each `ENUM` and `SET` column on each run ([#237](https://github.com/phalcon/migrations/issues/237))
- Fixed the PostgreSQL table morph changing each `SERIAL` column on each run, and `dropIndex()` not dropping the index ([#239](https://github.com/phalcon/migrations/issues/239))
- Fixed the foreign keys to a table in another schema, and the composite foreign keys ([#241](https://github.com/phalcon/migrations/issues/241))
- Fixed a short version getting one part too many (`1.1` gave `1.1.0.0`), and the versions of a second migrations directory being lost in `generate` and `list` ([#243](https://github.com/phalcon/migrations/issues/243))
- Fixed `generate` with `--data` writing the data of the log table ([#245](https://github.com/phalcon/migrations/issues/245))
- Fixed the help: it did not list the `--skip-ref-schema` and `--skip-foreign-checks` options ([#247](https://github.com/phalcon/migrations/issues/247))
- Fixed a new SQLite table getting no foreign keys ([#249](https://github.com/phalcon/migrations/issues/249))
- Fixed `generate --dry` exporting the data, and `run --dry` running the migrations ([#252](https://github.com/phalcon/migrations/issues/252))
- Fixed the database log turning off the MySQL foreign key checks on its own connection ([#254](https://github.com/phalcon/migrations/issues/254))
- Fixed `composer.json` having the version `4.0.0` after the release of `v4.0.1`; the `version` field is removed ([#256](https://github.com/phalcon/migrations/issues/256))
- Fixed the last foreign key or index of a table staying in the database ([#227](https://github.com/phalcon/migrations/issues/227))
- Fixed `migrate-files --dry-run=false` making a dry run ([#82](https://github.com/phalcon/migrations/issues/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](https://github.com/phalcon/migrations/issues/267))
- Fixed the order of incremental versions: `1.0.10` and `1.1.0`, and `1.0.0` and `1.0.0.1`, are now two versions. Before, only one of them ran ([#269](https://github.com/phalcon/migrations/issues/269))
- Fixed the banner and the error messages going to stdout, so the output of `export` was not valid SQL, and the help of `--skip-foreign-checks` and `--log-path` ([#273](https://github.com/phalcon/migrations/issues/273))
- Fixed `generate` on MySQL 8.0 writing an empty or old `AUTO_INCREMENT` value ([#275](https://github.com/phalcon/migrations/issues/275))
- Fixed `generate --version` making a second directory for the same version with another name, for example `1.0.0.0` next to `1.0.0`, and `--force` giving a PHP warning ([#277](https://github.com/phalcon/migrations/issues/277))
- Fixed `listTables()` giving the SQLite internal tables and the PostgreSQL tables of an extension ([#279](https://github.com/phalcon/migrations/issues/279))
- Fixed the database log for a second call in one process, for `import-log` with no `Config`, and for a `log-table` name in another case on MySQL and SQLite ([#59](https://github.com/phalcon/migrations/issues/59))
- Fixed a boolean key of the configuration with a text value, for example `"false"`, being `true` ([#282](https://github.com/phalcon/migrations/issues/282))
- Fixed the SQLite table morph failing to add a column with a position (`FIRST` or `AFTER`) ([#284](https://github.com/phalcon/migrations/issues/284))
- Fixed the rename of a column in the table morph on SQLite and PostgreSQL ([#285](https://github.com/phalcon/migrations/issues/285))
- Fixed a SQLite primary key of more than one column losing the order of its columns ([#286](https://github.com/phalcon/migrations/issues/286))

### Changed

- Changed the configuration and CLI names to one kebab-case name for each setting: `migrations`, `log-in-db`, `ts-based` and `export-data-from-tables`. The old names give a deprecation notice; 6.0 removes them ([#82](https://github.com/phalcon/migrations/issues/82))
- Changed the CLI options to win over the configuration for each setting. A boolean option takes `=false` to turn off a value of the configuration ([#82](https://github.com/phalcon/migrations/issues/82))
- Changed `generate` to create no version when no table changed ([#16](https://github.com/phalcon/migrations/issues/16))
- Changed the table morph to compare the `onUpdate` of a column. Generate again the versions that did not run yet ([#258](https://github.com/phalcon/migrations/issues/258))
- Changed the table morph to compare the `CURRENT_TIMESTAMP` defaults. Generate again the versions that did not run yet ([#155](https://github.com/phalcon/migrations/issues/155))
- Changed the table morph to compare the column comment ([#89](https://github.com/phalcon/migrations/issues/89))
- Changed the generated migration files to have `declare(strict_types=1)` and a `TABLE_NAME` class constant ([#87](https://github.com/phalcon/migrations/issues/87), [#107](https://github.com/phalcon/migrations/issues/107))
- Changed the source and test files to import the global functions and constants that they use ([#250](https://github.com/phalcon/migrations/issues/250))
- Changed CI to run php-cs-fixer (dry run) in the code style job on PHP 8.2 - 8.5 ([#216](https://github.com/phalcon/migrations/issues/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.10` and `1.1.0`, can stop `run` and `export` with an error ([#269](https://github.com/phalcon/migrations/issues/269))
- Changed the generated migration files to return an object of an anonymous class, with no class name. Old files run as before ([#87](https://github.com/phalcon/migrations/issues/87))
- Changed the file log: when no setting chooses the log, `run`, `list` and `clean` give a deprecation notice; 6.0 makes the database log the default. `Config::$logInDb` is `null` when the configuration does not set it ([#59](https://github.com/phalcon/migrations/issues/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](https://github.com/phalcon/migrations/issues/290))

Source: https://migrations.phalcon.io/5.0/changelog/index.mdx
