Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-602

Deprecate Migrations in favor of stable tools


    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Component/s: None
    • Security Level: All
    • Labels:


      The Migrations project is very big and currently unmaintained, even if there is definately need for a solution of the migration problem.

      The idea would be introduce a subcomponent in DBAL that delegates this to proven tools (DbDeploy and Liquibase, and Phinx for PHP based).

      The functionality Doctrine should provide is integration with the \Doctrine\DBAL\Schema API. Three operations come to mind:

      • status - What version are we? Do we need to execute more versions?
      • migrate - Execute the migration tool
      • create-migration - Create a new migration file of the underlying platform.

      The last operation needs to check if no versions need to be applied at the moment.

      interface MigrationTool
         /** @return MigrationCurrentStatus */
         public function getStatus();
         /** @return MigrationPerformedStatus */
         public function migrate($toVersion = null);
         /** @return MigrationRolledBackStatus */
         public function rollback($toVersion = null);
         /** @return MigrationCreatedStatus */
         public function create(Schema $toSchema);

      Every tool implements this interface and then we need 3 new commands for "status", "migrate" and "rollback". The "create" command can only be implemented in the context of the ORM.



          • Assignee:
            beberlei Benjamin Eberlei
            beberlei Benjamin Eberlei
          • Votes:
            5 Vote for this issue
            9 Start watching this issue


            • Created: