yeoman 全栈生成器社交 Oauth 问题

yeoman fullstack generator social oauth issue

当我将数据类型 JSON 分配给 facebook 和 google (默认情况下在生成器中)时,我遇到了 OAUTH 问题。我的数据库是 mysqL 并且出现此错误:

Server failed to start due to error: SequelizeDatabaseError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON,twitterJSON,googleJSON

如果我设置数据类型:文本或字符串,那么它可以工作,但我无法在 mysql 上查询。这个错误是关于 mariadb 但我正在使用 mySql 奇怪!

如何在 MySql 中存储 JSON 数据类型,因为我必须查询 facebook.id 等?

参考:https://github.com/angular-fullstack/generator-angular-fullstack/issues/2510

数据类型JSON问题

MySql 5.7支持类型JSON。

但问题是您正在使用 sequelize。 sequelize 是 node.js 的 ORM sequelize 不支持类型 JSON with MySql 仅支持类型 JSON with Postgres
另见附件。

最近与他们的成员确认
check here