toilal/doctrine-migrations-liquibase

This package is abandoned and no longer maintained. No replacement package was suggested.

Generate Liquibase ChangeLog from Doctrine Entities

1.1.5 2018-03-15 08:12 UTC

This package is not auto-updated.

Last update: 2021-09-18 13:27:27 UTC


README

UNMAINTAINED.Currently maintained drop-in replacement

Generate Liquibase ChangeLog from Doctrine Entities.

Build Status PHP Version Downloads License

API Usage

/** @var Doctrine\ORM\EntityManager $em */
$em = ...; // Retrieve Doctrine EntityManager as usual in your environment.

// Create a Liquibase SchemaTool with EntityManager
$schemaTool = new LiquibaseSchemaTool($this->em);

// Create a changelog that can be used on an empty database to build from scratch.
/** @var \DOMDocument $changeLog */
$changeLog = $schemaTool->changeLog()->getResult();
echo $changeLog->saveXML();

// Or create a diff changelog that can be used on current database to upgrade it.
/** @var \DOMDocument $diffChangeLog */
$diffChangeLog = $schemaTool->diffChangeLog()->getResult();
echo $diffChangeLog->saveXML();

Command Line Usage

To be done ...

Symfony Command

To be done ...