doctrine migrations 2 + zend framework 2 = is it possible?

雨燕双飞 提交于 2019-12-06 02:49:20

问题


I have used this guide http://www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/ and now I have a working Doctrine 2 + ZF2 software.

I use a versioning system and I want then use Doctrine MIGRATIONS tool to have a database migration system.

If I put on a shell ./doctrine-module orm:schema-tool:update it works correctly, but if I use a migration tools for example ./doctrine-module migrations:status the system give me an error:

[Doctrine\DBAL\Migrations\MigrationException]
Migrations namespace must be configured in order to use Doctrine migrations.

Which configurations are needs? Does DoctrineOrmModule support Doctrine migration?

I have found this for zf1 http://moxune.com/blog/2011/10/configure-doctrine-migrations-2-zend_config/


回答1:


If you check the current Travis CI CLI test for DoctrineORMModule you will notice that there's a --configuration parameter pointing to an XML configuration, as described in Doctrine Migrations documentation. Setting that parameter and having DoctrineORMModule configured correctly should allow you to use the CLI.



来源:https://stackoverflow.com/questions/10620794/doctrine-migrations-2-zend-framework-2-is-it-possible

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!