教义迁移phar,如何设置类型映射? [英] doctrine migrations phar, how to setup type mapping?

查看:166
本文介绍了教义迁移phar,如何设置类型映射?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的非symfony项目中使用原则迁移,所以我从 https:// github.com/doctrine/migrations 的。我正确配置了一切(数据库配置和配置),然后在进行迁移:状态时,我收到错误:

I want to use doctrine migrations in my non-symfony project, so I got the phar standalone from https://github.com/doctrine/migrations. I configured everything properly (db-configuration and configuration) and then when doing "migrations:status" I get the error:


[Doctrine\\ \\ DBAL\DBALException]

请求的未知数据库类型枚举,
Doctrine\DBAL\Platforms\MySqlPlatform可能不支持。

[Doctrine\DBAL\DBALException]
Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.

现在有很多关于如何在symfony应用程序的上下文中解决这个问题的资源(例如 http://wildlyinaccurate.com/doctrine-2-resolving-unknown-database-type-enum-requested ),但我可以在哪里在这种情况下的类型映射?我应该提取.phar,把代码放在它(哪里?)然后重新打包它? (如何?)

Now there are many resources on how to fix this in the context of a symfony app (for instance http://wildlyinaccurate.com/doctrine-2-resolving-unknown-database-type-enum-requested) but where can I put this type mapping in this case? Should I extract the .phar, put the code in it (where?) and then re-package it? (how?)

推荐答案

什么奥克拉姆斯说:

使用迁移并自行设置CLI。从克隆github.com/doctrine/migrations开始,并通过作曲家安装。之后,根据自己的需要自定义您的CLI运行程序来设置连接。

You need to use migrations and setup the CLI on your own. Start from cloning github.com/doctrine/migrations and installing via composer. After that, customize your CLI runner to setup the connection according to your own needs.

这篇关于教义迁移phar,如何设置类型映射?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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