mindy / migration-manager
1.1
2018-02-27 15:11 UTC
Requires
- php: >=7.0
- doctrine/dbal: ~2.0
- doctrine/migrations: ~1.0
Requires (Dev)
- phpunit/phpunit: ^6.5
- symfony/dependency-injection: ~3.0
- symfony/filesystem: ~3.0
- symfony/http-kernel: ~3.0
This package is not auto-updated.
Last update: 2024-12-22 06:52:49 UTC
README
Установка
composer require mindy/migration-manager --prefer-dist
Использование
<?php use Doctrine\DBAL\DriverManager; use Mindy\Component\MigrationManager\MigrationFactory; $connection = DriverManager::getConnection(['url' => 'sqlite:///:memory:']); $manager = MigrationFactory::createManager($connection, 'application', __DIR__.'/Migrations', '\\Application\Migrations'); // Generate new migration $migrationPath = $manager->generateMigration(); echo $migrationPath . PHP_EOL; // Migrate $manager->doMigrate();