引用的 table 不在字典中

Referenced table is not in dictionary

当我构建数据库时出现以下错误:

Referenced table `contentcategory` is not in dictionary.
Referenced table `contentcategory` is not in dictionary.
Referenced table `contenttype` is not in dictionary.
Referenced table `content` is not in dictionary.

我使用 Mysql 和 Pomelo.EntityFrameworkCore.MySql

这很可能是大小写问题,其中 MySQL 假定 table 名称为 contentcategory 作为参考,而实际上它类似于 ContentCategory.

我们有一个 pull request 从 4 月开始开放,看起来被原始贡献者遗弃了。

我将修复 PR 并将其合并,以便从明天开始,此问题的解决方法将成为我们 nightly builds 的一部分。

链接的 PR 还包含有关如何出现此问题的信息:

Okay, that is in line with what I experienced as well. So manually (either by writing the name in the GUI or by using an ALTER TABLE statement directly) adding a reference with different casing (on a server with case insensitive file name handling) or disabling SQL Identifiers are Case Sensitive [in MySQL Workbench] can lead to this result.

从技术上讲,这是一个 MySQL 或 Workbench 错误,但无论如何我们都会为其实施解决方法。