原则迁移2 + zend框架2 =是可能吗? [英] doctrine migrations 2 + zend framework 2 = is it possibile?
问题描述
我已经使用本指南 http: //www.jasongrimes.org/2012/01/using-doctrine-2-in-zend-framework-2/ ,现在我有一个工作的Doctrine 2 + ZF2软件。
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.
我使用版本系统,然后我想要使用Doctrine MIGRATIONS工具来创建数据库迁移系统。
I use a versioning system and I want then use Doctrine MIGRATIONS tool to have a database migration system.
如果我放一个shell ./ doctrine-module orm:schema-tool:update
它正常工作,但如果我使用迁移工具,例如 ./ doctrine-module migration:status
系统给我一个错误:
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 ]
必须配置迁移命名空间才能使用Doctrine迁移。
需要哪些配置? DoctrineOrmModule是否支持Doctrine迁移?
Which configurations are needs? Does DoctrineOrmModule support Doctrine migration?
我发现这个为zf1 http://moxune.com/blog/2011/10/configure-doctrine-migrations-2-zend_config/
I have found this for zf1 http://moxune.com/blog/2011/10/configure-doctrine-migrations-2-zend_config/
推荐答案
如果您查看 DoctrineORMModule 的当前Travis CI CLI测试您会注意到有一个 - 配置
参数指向XML配置,如原则迁移文档所述。设置该参数并使DoctrineORMModule配置正确应该允许您使用CLI。
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.
这篇关于原则迁移2 + zend框架2 =是可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!