- Added
@template-implements ArrayAccess<string, mixed>annotation toOptionStack(psalm compliance) (#167) - Added
Phalcon\Migrations\Db\Adapter\Mysql,Postgresql,Sqlite- schema introspection (columns, indexes, foreign keys, table options) and full DDL generation per driver (#167) - Added
Phalcon\Migrations\Db\Column,Index,Referencevalue objects replacing theirPhalcon\Dbcounterparts (#167) - Added
Phalcon\Migrations\Db\Connection- trimmed PDO wrapper covering all database operations (#167) - Added
Phalcon\Migrations\Db\PhalconColumnBridgefor transparent backward compatibility: migration files usingPhalcon\Db\Columncontinue to work without modification (#167) - Added
Phalcon\Utils\Camelizeto be used instead of the one from Phalcon (#167) - Added
migration migrate-filesCLI command to update existing migration files fromPhalcon\DbtoPhalcon\Migrations\Dbnamespace (#167) - Added
tests/Fakes/directory withMigrationFakeandMigrationCommandFaketest helpers; registeredPhalcon\Migrations\Tests\Fakes\PSR-4 namespace incomposer.json(#167) - Added
tests/unit/Sqlite/AdapterTest.phpcoveringtableExists(), primary key handling, function defaults, and index listing against an in-memory SQLite database, pluscurrent_timestamp()default tests for theMysqlandPostgresqladapters (#176) - Added backwards-compatibility fixtures in
tests/_data/backcompat/old/andtests/_data/backcompat/new/covering old-format (Phalcon\Db\*) and new-format (Phalcon\Migrations\Db\*) migrations across two versions each (create + alter column) (#167) - Added migration script to migrate existing migrations to new references; provision for running either migrations (old/refactored) (#167)
- Added rollback tests exercising
DIRECTION_BACKandcreatePrevClassWithMorphMethodto verify table structure is correctly restored when running migrations backwards (#167)
- Fixed PHPStan errors: removed dead
$mapproperty fromAdapterFactory, corrected@var SplFileInfoannotation, removed@methodannotations fromMigrationclass docblock that causedmethod_exists()to always evaluate to true, removed redundant@var Configannotation that made aninstanceofguard appear always-true (#167) - Fixed Psalm errors: unused
$referenceand$indexColumnsforeach values replaced with$_, unused$descriptionin first loop ofprintParameters()replaced with$_,realpath()false return handled explicitly, implicit__toStringcasts made explicit with(string), mixed int/float arithmetic inIncrementalItemmade type-safe with(int) pow()and intermediate$multipliervariable,addMinor()string+=int fixed with explicit(string)((int) $parts[0] + $number)(#167) - Fixed
MysqlandPostgresqladapters quoting the MySQL/MariaDB-stylecurrent_timestamp()default spelling as a string literal; function-default recognition is now shared across all adapters viaAbstractAdapter::isCurrentTimestampDefault(), PostgreSQL normalises the parenthesized spelling it does not accept and also applies function defaults in themodifyColumn()SET DEFAULTpath (#176) - Fixed
PhalconColumnBridge::fromPhalcon()preserving an empty-stringgetAfterPosition()fromPhalcon\Db\Columninstead of normalising it tonull; this causedAFTER ``in the generated ALTER SQL when adding columns from old-format migrations (#167) - Fixed
Sqlite::buildCreateTableSql()silently dropping primary keys declared with the generated-migrationPRIMARYindex convention (namePRIMARY/ typePRIMARY); a table-levelPRIMARY KEYclause is now emitted unless a column already renders asINTEGER PRIMARY KEY AUTOINCREMENT(#176) - Fixed
Sqlite::listIndexes()reporting internalsqlite_autoindex_*entries, which the table morph then attempted (and failed) to drop (#176) - Fixed
Sqliteadapter failing withnear "PRIMARY": syntax errorduring table morph; SQLite cannot add a primary key viaALTER TABLE, soaddPrimaryKey()is now a no-op consistent with the other unsupported SQLite DDL operations (#176) - Fixed
Sqliteadapter inheriting theinformation_schema.tablesbasedtableExists(), which made every migration run against SQLite fail withno such table: information_schema.tables; the existence check now queriessqlite_master(#176) - Fixed
Sqliteadapter storing function defaults as literal strings;CURRENT_TIMESTAMP,CURRENT_TIMESTAMP(), andNOW()are now emitted as the bareCURRENT_TIMESTAMPkeyword (#176) - Fixed
morphTable()passing the original$definitionarray (containing unconvertedPhalcon\Db\Column,Index,Referenceobjects) tocreateTable(); objects are now normalised toPhalcon\Migrations\Db\*types in-place during the column conversion loop, so old-format migration files work correctly on table creation (#167) - Fixed four
\$thissyntax errors intests/unit/Cli/RunTest.phpthat prevented the test suite from loading (#167) - Fixed typo in
Generate::checkEntityExists()error message:'Migration entity is e,pty'→'Migration entity is empty'(#167)
- Added named static constructor methods to all exception classes returning
self, eliminating rawnew ExceptionClass('literal string')throw sites across the codebase (#167) - Changed Config file loading (
.ini,.json,.yaml) to now use native PHP functions (parse_ini_file,json_decode,yaml_parse_file) instead ofPhalcon\Configadapters (#167) - Changed
Observer/ProfilerandListeners/DbProfilerListenerwithoutPhalcon\Dbdependency; query timing output is unchanged (#167) - Changed minimum PHP version to 8.2 (#167)
- Changed test suite from Codeception to PHPUnit 11.5; all tests moved to a single
unitsuite undertests/unit/(#167) - Configured PHPStan at level 5 (embedded in
phpstan.neon.dist); zero errors (#167) - Configured Psalm (
psalm.xml.dist) with suppressions forMissingOverrideAttribute(PHP 8.3 only, project targets 8.2),PossiblyUnusedMethod/UnusedClass(library public API),PossiblyNullArrayOffset(issetis safe with null keys),PossiblyInvalidCast(Psalm cannot track the conditional$storagefield type), andRedundantCast(Psalm contradicts itself onpow()return type narrowing) (#167) - Expanded test suite from 91 to 342 tests; added test classes for
Utils\Config,Utils\Helper,Version\IncrementalItem,Version\ItemCollection,Version\TimestampedItem,Console\Color,Console\OptionStack,Console\Commands\MigrateFiles,Console\Commands\Migration,Generator\Snippet, allExceptionclasses,Observer\Profiler,Listeners\DbProfilerListener,Db\PhalconColumnBridge,Db\FieldDefinition,Db\Adapter\Mysql,Db\Adapter\Postgresql,Db\Connection,Migration\Action\Generate,Mvc\Model\Migration, andMvc\Model\Migration\TableAware\ListTablesIterator(#167) - Moved CLI entry point from project root to
bin/phalcon-migrations(#167) TimestampedItem,ListTablesDb,ListTablesIterator,Connection, andAdapterFactorynow use the customPhalcon\Migrations\Exception\InvalidArgumentExceptioninstead of the PHP built-in, giving the library a consistent exception hierarchy (#167)
- Removed
Phalcon\Config\Configdependency; replaced withPhalcon\Migrations\Utils\Configflat value object (#166) - Removed
Phalcon\Dbdependency entirely; replaced with library-localPhalcon\Migrations\Dblayer (#166)
2.2.4 (2021-12-10)
- Changed column modification behavior during table morph (#126)
2.2.3 (2021-08-11)
2.2.2 (2021-08-08)
- Integrated nette/php-generator, changed algorithm of migrations generation (#90)
2.2.1 (2021-08-03)
2.2.0 (2021-08-03)
Supported Versions: 7.3, 7.4, 8.0
- This release provides initial PHP 8 support.
2.1.6 (2021-03-22)
- Fixed duplicated table
phalcon_migrationsin PostgreSQL (#104) - Fixed morphing when column attribute
unsigedis changed (#109)
2.1.5 (2020-11-03)
- Enhanced error output during failed table morph (#99)
2.1.4 (2020-08-31)
- Fixed 'options' table definition (#94)
2.1.3 (2020-08-29)
- Improved tests codebase (#86)
- Fixed
.pharcompilation (#91) - Added filter for column default value (65735c1)
2.1.2 (2020-03-30)
Supported PHP versions: 7.2, 7.3, 7.4
- Added separate changelog document
CHANGELOG.md(#85) - Fixed long execution of data insertion during migration run (x14 faster) (#76)
- Added
README.mdinside tests folder (#78)
2.1.1 (2020-03-26)
Supported PHP versions: 7.2, 7.3, 7.4
- Added size for
DECIMALColumn type (MySQL) (#77) - Added possibility to specify options
no-auto-increment,skip-ref-schemaandskip-foreign-checksfrom config file (#80)
2.1.0 (2020-03-22)
Supported PHP versions: 7.2, 7.3, 7.4
- Added option to disable and enable foreign key (#11)
- Added config option to ignore reference schema (#68)
- Added more tests (38028e8)
- Removed extended class of Phalcon PDO and Dialect (58c383b)
2.0.0 (2020-03-19)
- Integrated Phalcon CLI Options Parser (COP) (#20)
- Removed duplicated required 1st argument
migrationin CLI (#20) - Rewrote all tests from PHPUnit to Codeception, also added CLI tests (#20, 2ede70c)
1.2.2 (2020-03-18)
- Fixed references generation (d225f61)
1.2.1 (2020-03-13)
- Fixed running migration that were added before the latest (#66)
- Refactored part of Migration file generation
1.2.0 (2020-03-12)
- Disabled AUTO_INCREMENT option in migrations by default (#57)
- Added PRIMARY KEY in table "phalcon_migrations" on column "version" (#58)
- Implement PHAR release for each new version (#12)
- Updated shivammathur/setup-php to v2 and add cache for extensions (5ce0c6a)
1.1.7 (2020-02-10)
- Added support of ENUM column type (#7)
1.1.6 (2020-02-06)
- Updated list of column types without
size(#49) - Fixed generation table columns with NULL definition (#51)
- Fixed running time based migrations (#53)
1.1.5 (2020-02-02)
- Fixed adding primary key in migration generation for PostgreSQL (#1)
- Added test cases in migrations to run
SET FOREIGN_KEY_CHECKS(#2) - Implemented workflows for PostgreSQL with new tests (#43)
- Added support of 'descr' option in config file (#39)
- Fixed PHP Notice in case if migrations directory(ies) was(were) not found (#40)
- Adapt code to PSR-12 format (#47)
1.1.4 (2020-01-29)
- Updated Github Actions to run tests with different PHP versions: 7.2, 7.3, 7.4 (#32)
- Updated minimum required version of Phalcon to
4.0.0(b3e1a4a) - Reviewed support of MySQL
JSONtype (#3) - Fixed adding foreign key during separate migrations (#29)
1.1.3 (2020-01-01)
- Added support of
TIMEdatatype (#8)
1.1.2 (2019-12-30)
1.1.1 (2019-12-21)
- Added support of previous unexisted column types: BIGINT, MEDIUMINT, TINYINT, MEDIUMMEXT, LONGTEXT, TINYTEXT (#24)
- Fix size for DOUBLE column type (543a010, phalcon/phalcon-devtools#1399)
1.1.0 (2019-12-14)
- Refactored Migrations class (9603ab7, 24a62fa)
- Implemented bin for CLI usage (#13)
- Fixed global installation of package (#15)
- Fixed
---log-in-dbparameter (#17) - Fixed omitting size for DATE and DATETIME types (#22)
1.0.4 (2019-11-18)
- Fixed migrations run with 'migrationsDir' option as a string
1.0.3 (2019-11-18)
- Fixed passing 'migrationsDir' option as a string
- Fixed usage of correct phalcon/ide-stubs:v4.0.0-rc.3 version
1.0.2 (2019-11-17)
- Removed ext-posix from composer requirements
1.0.1 (2019-11-17)
- Configured Github Actions
- Fixed passing third parameter to generateAll() method
- Refactored current Tests
- Implemented new Tests
- Enabled Codecov.io reports
- Small refactors in code
- Moved Phinx composer package to suggestions
- Bumped minimal Phalcon version to
4.0.0-RC.3
1.0.0 (2019-10-31)
- First release, separated from devtools