stemizer/php-migration

a mysql migration tool for php applications without framework

Installs: 115

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/stemizer/php-migration

v1.0.0-b 2020-07-06 06:57 UTC

This package is auto-updated.

Last update: 2025-12-15 05:33:27 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();