教义迁移2 + zend框架2 =可能吗? [英] doctrine migrations 2 + zend framework 2 = is it possible?

查看:59
本文介绍了教义迁移2 + zend框架2 =可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用本指南 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.

如果我放在外壳上 ./ doctrine-module orm:schema-tool:update 可以正常工作,但是如果我使用迁移工具,例如 ./ doctrine-module迁移:状态系统给我一个错误:

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] < br>
必须配置迁移名称空间才能使用Doctrine迁移。

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

需要哪些配置? DoctrineOrmModule是否支持Do​​ctrine迁移?

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测试,您会注意到有一个- -configuration 参数指向XML配置,如 Doctrine迁移文档中所述。设置该参数并正确配置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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆