教义迁移phar,如何设置类型映射?

编程入门 行业动态 更新时间:2024-10-23 15:26:43
本文介绍了教义迁移phar,如何设置类型映射?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在我的非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,如何设置类型映射?

本文发布于:2023-06-04 08:34:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/493347.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:教义   如何设置   类型   phar

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!