gpt4 book ai didi

mysql - Orchard 1.8.1 安装MySQL

转载 作者:可可西里 更新时间:2023-11-01 06:44:49 29 4
gpt4 key购买 nike

我之前的项目一直在使用 Orchard 1.8。我决定尝试 1.8.1 我正在使用 MySQL。Atfer 我编译了 Orchard 1.8.1 的源代码并安装了一个空白数据库。仪表板中出现以下消息:

Some features need to be upgraded: Orchard.Autoroute, Orchard.MediaLibrary

当我点击更新时。出现此消息:

    An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back
The parameters dictionary contains a null entry for parameter 'bulkAction' of non-nullable type 'Orchard.Modules.ViewModels.FeaturesBulkAction' for method 'System.Web.Mvc.ActionResult FeaturesPOST(Orchard.Modules.ViewModels.FeaturesBulkAction, System.Collections.Generic.IList`1[System.String], System.Nullable`1[System.Boolean])' in 'Orchard.Modules.Controllers.AdminController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parametername: parameters

...

对于 1.8,我注意到 MySQL 也存在一些问题。好像是nullable类型有问题。

如果有办法以某种方式更改服务器配置。我可以完全访问数据库服务器。

最佳答案

问题是因为 DisplayAlias 索引长度设置为 2048 字节,MySQL 索引不能超过 767 字节。

要解决此问题,请更改:

SchemaBuilder.AlterTable("AutoroutePartRecord", table => table
.CreateIndex("IDX_AutoroutePartRecord_DisplayAlias", "DisplayAlias"));

到:

SchemaBuilder.AlterTable("AutoroutePartRecord", table => table
.CreateIndex("IDX_AutoroutePartRecord_DisplayAlias", "DisplayAlias(767)"));

在 Orchard.Autoroutes Migrations.cs 中

修复也可以应用于“FolderPath”索引上的 MediaLibrary 迁移:

SchemaBuilder.AlterTable("MediaPartRecord", t => t
.CreateIndex("IDX_MediaPartRecord_FolderPath", "FolderPath(767)"));

有关详细信息,请参阅 AoutroutePartRecord Index under MySQL Issue

关于mysql - Orchard 1.8.1 安装MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24753400/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com