Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Latest commit

 

History

History
39 lines (27 loc) · 1.79 KB

README.md

File metadata and controls

39 lines (27 loc) · 1.79 KB

doctrine-migrations-liquibase

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 ...