我想在我的非symfony项目中使用原则迁移,所以我从 https:// github/doctrine/migrations 的。我正确配置了一切(数据库配置和配置),然后在进行迁移:状态时,我收到错误:
I want to use doctrine migrations in my non-symfony project, so I got the phar standalone from github/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应用程序的上下文中解决这个问题的资源(例如 wildlyinaccurate/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 wildlyinaccurate/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/doctrine/migrations开始,并通过作曲家安装。之后,根据自己的需要自定义您的CLI运行程序来设置连接。
You need to use migrations and setup the CLI on your own. Start from cloning github/doctrine/migrations and installing via composer. After that, customize your CLI runner to setup the connection according to your own needs.
更多推荐
教义迁移phar,如何设置类型映射?
发布评论