Skip to content

MindyPHP/MigrationManager

Repository files navigation

Migration Manager

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

About

Migration manager for Mindy ORM

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages