Download the PHP package allenjb/migrationmanager without Composer
On this page you can find all versions of the php package allenjb/migrationmanager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download allenjb/migrationmanager
More information about allenjb/migrationmanager
Files in allenjb/migrationmanager
Package migrationmanager
Short Description A simple, framework agnostic, MySQL non-reversible migrations library that accepts a pre-configured PDO connection
License MIT
Homepage https://github.com/AllenJB/MigrationManager
Informations about the package migrationmanager
MigrationManager
A simple, framework agnostic, MySQL non-reversible migrations library that accepts a pre-configured PDO connection (allowing you to preset desired connection configuration such as sql_mode or timezone and your own error handling).
Why? I looked at other libraries for migrations but they all had a large number of issues around MySQL language support and reversals, or controlling the mysql connection (eg. timezone, sql_mode) is problematic because they control creation of the connection. While I could try to enforce not using the problematic features, it's much easier if they aren't available in the first place.
Versions
Use version 1 for compatibility with PHP 5.6. Version 2+ require PHP 7.1+
Install
Via Composer
Usage
Migration Files
Filenames MUST be in the format YYYYMMDD_HHmm_ClassName.php
Time is in 24 hour format.
ClassName must be unique.
If the date is greater than today (disregarding time), then the migration will not be executed until that date. This allows you to schedule migrations in the future (for example, you're removing a field but want to leave it in the database for a period to guard against dataloss / code rollbacks).
License
The MIT License (MIT). Please see License File for more information.