2.6.0 - 2024-07-19
- support for Symfony 7
2.5.0 - 2023-12-08
- support for PHP 8.3
- default for integer column types (Thanks to fagai)
2.4.0 - 2023-06-01
- unique constraints support (Thanks to Anton Khainak)
2.3.0 - 2022-11-08
- support for PHP 8.2
- creates migration dir if doesn't exist
2.2.0 - 2022-04-26
- support for default collation for mysql in config
2.1.0 - 2022-04-14
- config options template and indent
- method tableIndexExists (Thanks to Anton Pobis)
2.0.0 - 2022-01-24
- use utf8mb4 as default charset for mysql (fix but BC break, use e.g.
$this->changeCollation('utf8mb4_general_ci')
to change all tables and fields to it) - dropped support for unsupported PHP versions and added native typehints (BC break)
- changed autoload to PSR-4
- moved namespace Dumper to Phoenix\Dumper (BC break)
- moved namespace Comparator to Phoenix\Comparator (BC break)
- added
declare(strict_types=1);
to all classes - all classes which can be final are final (BC break if there are some extensions)
- all methods which can be final are final
- moved default command names from configure to __construct
- class MysqlWithJsonQueryBuilder (BC break)
- method setName from AbstractCommand (BC break - if setName() is called after name is already set, it will be changed)
- dropped support symfony libs (console, finder and yaml) 3.x and 4.x (BC break)
- visibility for constants
- support for symfony libs (console, finder and yaml) 6.x
1.12.0 - 2022-01-07
- support MySql 8 and PostgreSQL 14
- table with no primary keys in Dumper
1.11.1 - 2021-12-07
- removed phpspec/prophecy from misused replace in
composer.json
1.11.0 - 2021-12-06
- support for PHP 8.1
- support for
CURRENT_TIMESTAMP
for columns with typedatetime
(Thanks to Jared Cheney)
1.10.0 - 2021-08-23
- timestamptz (timestamp with time zone) column type for pgsql (Thanks to Taichi Inaba)
1.9.1 - 2021-08-18
- Mysql: Use FIRST in combination with autoincrement generates wrong query
1.9.0 - 2021-07-07
- support for different operators in
$conditions
array of PdoAdapter methods (Thanks to Giuliano Collacchioni) - support for views
- readme link (Thanks to Niek Oost)
1.8.0 - 2021-06-01
- year column type (year for mysql, numeric(4) for pgsql)
- new options add-table-exists-check and auto-increment to Dumper command
- documentation for primary keys
- step by step tutorial for using dump command to change mysql to pgsql or vice versa
- single quotes in comments
- table comment in dump
- transfer tinyint(1) to boolean in mysql only if it has default values 1 or 0
- dump command skip everything which is not of type "BASE TABLE" (VIEW, SYSTEM VIEW etc.)
- dumping special values (null, true, false, strings with apostrophe)
1.7.0 - 2021-04-14
- simple autowiring in migrations
1.6.0 - 2021-04-03
- bit column type (Thanks to Slava Ershov)
- PHP 8.1 deprecation notice (Thanks to Daniel Opitz)
- escaping column value in Dumper (Thanks to Slava Ershov)
- nullable timestamp field with default value
- migrate / rollback commands option --class will work without starting backslash
1.5.0 - 2021-01-25
- moved tests from travis to github actions and removed scrutinizer
- improved code applying phpstan
- support to change collation on all existing tables and columns
- support for turn on / off checking foreign keys in migration
1.4.0 - 2020-12-01
- default value of boolean columns is set to false if it is not null (this prevent from errors when user forgot set default to false)
- better organized docs
- support for PHP 8.0
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
- set autoincrement for new table and also for existing table
- escape string in QueryBuilderInterface
1.3.0 - 2020-04-16
- method renameColumn() to migrations
- PHPStorm meta for better suggestions
- migration datetime to json output of migrate / rollback commands for future purpose
- smallserial as primary in pqsql
- method truncate() to migrations
- settings order and length to index columns
- DiffCommand for creating migration from diff of two databases or migration and database
- target option for migrate and rollback commands
- unfreezed symfony/console and added versions 3.4.31 and 4.3.4 to conflict
1.2.0 - 2020-03-16
- changed comparation
==
to===
and added strict parameter to in_array
- support for
CURRENT_TIMESTAMP
for columns with typetimestamp
- support for json column type for newer versions of mysql (>= 5.7.8) (To keep using text instead of json, force version in config)
- tests on travis
1.1.1 - 2019-09-12
- freezed symfony/console to >=3.1 <3.4.31|>=4.0 <4.3.4
- support for nette/neon ^3.0
1.1.0 - 2019-02-11
- time column type (Thanks to Tibor Mikóczy)
- timestamp column type
1.0.0 - 2018-06-20
- added return type (:void) for up() and down() methods in AbstractMigration (BC Break - Fix: add return type :void to all migrations)
- replaced nette/finder with symfony/finder
- PDOAdapter::execute splitted into PDOAdapter::execute(PDOStatement $sql) and PDOAdapter::query(string $sql)
- removed support for sqlite adapter
- removed nette/utils
- typehint for fetch method
0.13.0 - 2018-03-14
- second parameter of methods fetchAll and fetch
string $fields = '*'
has been changed toarray $fields = ['*']
(BC Break - fix: change string to array)
- methods tableExists, tableColumnExists and getTable to migration
- posibility to add an autoincrement primary key on an existing table
- add a primary key on an existing table
0.12.1 - 2017-12-18
- binding for null and boolean values
0.12.0 - 2017-12-06
- dropped support for PHP 5.6, PHP 7.0 and hhvm
- dropped support for symfony/console ^2.8 and added support for symfony/console ^4.0 and symfony/yaml ^4.0
- added typehints
0.11.0 - 2017-11-14
- option to execute all migrations from selected directory(-ies) in migrate and rollback command
- option to execute migrations via classname in migrate and rollback command
- TestCommand to test next migration via migrate-rollback-migrate(-rollback)
0.10.0 - 2017-10-01
- method copyTable for copy table structure, data or both
- interactive choice of migration dirs in CreateCommand
- comment for table
- comment for column
- PHP 7.2 compatibility
- renameTable refactoring
- ucfirst for lowercase named migrations
0.9.1 - 2017-06-07
- reverted calling execute instead of run for InitCommand in AbstractCommand
0.9.0 - 2017-06-07
- default action for migration table is now alter instead of create - possible BC, use
->create()
for new tables
- dump command for creating migration from existing database
- structure introduced - all migrations are checked against actual database structure - possible BC if unknown column types are used
- command options config, config_type, template and indent require value
- typehints in MigrationTable
0.8.0 - 2017-05-02
- json output for all commands
- migration datetime to Status command
- column settings class with constants
0.7.0 - 2017-04-06
- move all table methods (addColumn, addIndex, addForeignKey etc) from AbstractMigration to new Element MigrationTable which is now used in Query Builders
- migration dir in create command is required if there are more then one migration dir registered
- using serial and bigserial for autoincrement primary keys in pgsql instead of creating and dropping custom sequence
- method getSettings to Column
- column types: tiny integer, small integer and medium integer, double, tinytext, mediumtext, longtext, tinyblob, mediumblob, blob, longblob, binary, varbinary, point, line, polygon
- wrong order in rollback
- magic method variants addColumn and changeColumn from MigrationTable - possible BC if somebody uses methods addColumn(Column $column) or changeColumn($oldName, Column $column)
0.6.1 - 2016-12-13
- support for changing column settings (allowNull, default) in pgsql (Thanks to Tibor Mikóczy)
0.6.0 - 2016-09-26
- deprecated variants of methods addColumn and changeColumn which allowed set all settings individually as parameter
- load configuration from all default config files (php, yml, neon, json) if no file is set as config option in command
- support for json config file
- status command - list of migrations already executed and list of migrations to execute
- dry run - execute migrate or rollback command without real executing queries. Commands just print queries which would be executed
- enum and set column types
0.5.0 - 2016-08-03
- column types date, bigint, float
- support for change charset in mysql (per table and also per column)
- possibility to create custom templates
- option "first" for migrate command
- option "all" for rollback command
- simple altering tables for pgsql: changes of column names, types and type casting for columns
- support for multi insert
- support for multi delete (IN condition)
- several bugs in PdoAdapter
- output for executed queries in commands (Option -vvv)
0.4.0 - 2016-06-13
- support for yaml and neon configs
- command execution time for each migration / rollback and total execution time
- method tableInfo for AdapterInterface
- support for changing columns in sqlite adapter
- composer libraries
0.3.0 - 2016-05-23
- possibility to set custom name for index
- method drop index by name
- method select to Adapters
- added support for using DateTime instances in inserting / updating data
- automatically created names of indexes are now: idx_{tablename}{implode('', columns)} - possible BC
- boolean db type from int to tinyint in mysql
- minimal version of PHP to 5.6
0.2.0 - 2016-03-02
- possibility to set position for column: after, first
- method changeColumn to migrations
- insert, update, delete methods
- method Table::addIndex, now it accepts one parameter of type Index
- method Table::addForeignKey, now it accepts one parameter of type ForeignKey
- method addColumn accepts:
- parameters name, type, allowNull, default, length, decimals, signed, autoincrement
- array with keys: null, default, length, decimals, signed, autoincrement, after, first as 3rd parameter (name and type are still first two parameters)
- object of type Column as only one parameter
0.1.1 - 2016-02-16
- decimal type for MySQL
- rename table for all adapters
- unsigned for MySQL
0.1.0 - 2016-02-05
- first tagged version
- 3 PDO Adapters: MySQL, PgSQL, SQLite
- supported methods in migrations: addColumn, addIndex, addForeignKey, dropColumn, dropIndex, dropForeignKey
- supported column types: string, integer, boolean, text, datetime, uuid, json, char