stemizer / php-migration
MySQL migration tool for standalone PHP applications.
v1.0.0
2026-09-30 09:30 UTC
Requires
- php: >=5.3.2
Requires (Dev)
- phpunit/phpunit: 9.6.37
- squizlabs/php_codesniffer: 3.13.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-30 16:06:38 UTC
README
a MySQL migration tool for framework-free PHP applications.
installation
you can add this package dependency to your project using composer:
composer require stemizer/php-migration
if you only need this package during development:
composer require --dev stemizer/php-migration
usage example
/** * pdo instance */ $instance = new PDO(args); /** * example migration scripts, executed in natural order of file names : * 0-create-tbl-foo.sql * 1-modify-tbl-foo.sql * 2-another-migration.sql * 2-foo-new-fields.sql * 3-foo-new-index.sql * ... * 9-foo-new-index-y.sql * 10-foo-new-index-z.sql */ $scripts_dir = '/var/www/myproject/any/path'; /** * no output */ $migration = new YD\Migration($instance, $scripts_dir); $migration->run();
tests
composer install
vendor/bin/phpunit