stemizer / php-migration
a mysql migration tool for php applications without framework
v1.0.0-b
2020-07-06 06:57 UTC
Requires
- php: >=5.3.2
Requires (Dev)
- phpunit/phpunit: 9.2.4
- squizlabs/php_codesniffer: 3.5.5
This package is auto-updated.
Last update: 2025-06-15 04:27:29 UTC
README
a mysql migration tool for php applications without framework
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 : * 0-create-tbl-foo.sql * 1-modify-tbl-foo.sql * 2-another-migration.sql * 2-foo-new-fields.sql * 3-foo-new-index.sql */ $scripts_dir = '/var/www/myproject/any/path'; /** * no output */ $migration = new YD\Migration($instance, $scripts_dir); $migration->run();