mindy/migration-manager

1.1 2018-02-27 15:11 UTC

This package is not auto-updated.

Last update: 2024-10-27 05:52:00 UTC


README

Build Status codecov

Установка

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();