Search code examples
mysqlmariadbgoogle-authenticationfacebook-authenticationyeoman-generator

yeoman fullstack generator social oauth issue


i am facing the OAUTH issue when i assign datatype JSON to facebook and google (that is by default in generator) . My database is mysqL AND I getting this error :

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

if i set datatype : text or string then it works but i cant query on mysql then. This error is about mariadb but i am using mySql strange!

How to store in JSON datatype in MySql because i have to query on in like finding facebook.id etc?

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


Solution

  • Data Type JSON issue

    MySql 5.7 support the type JSON. enter image description here enter image description here

    But the issue is you are using sequelize. sequelize is a ORM for node.js sequelize didn't support type JSON with MySql only support JSON with Postgres
    also see attachment.

    enter image description here

    Recently confimed with their member
    check here enter image description here