mindy / migration-manager
Installs: 160
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mindy/migration-manager
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: 2025-10-12 10:49:36 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();