You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My setup chooses Sequelize for data modelling, and it is linked to a Postgresql database. The scaffolding generated this portion of the user model in /server/api/user/user.model.js :
To make Oauth work in this confirmation, I had to change the datatypes for facebook, google, twitter, and github to
twitter: DataTypes.JSON
. Since the generator had already created the table model in Postgresq;, I had to either drop that table or manually alter it. I assume this might cause problems with other Sequelize databases, since JSON is in Postgres but not some others. Not sure if it would cause more harm then good to change the generator template in this manner, but it worked for my purpose.
Secondly, I had to manually modify each of the /server/auth/twitter/passport.js type files to match proper sequelize syntax.
i am facing the OAUTH issue when i assign datatype JSON to facebook and google. my database is mysql, 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 them. How to store in JSON datatype in MySql ?
My setup chooses Sequelize for data modelling, and it is linked to a Postgresql database. The scaffolding generated this portion of the user model in /server/api/user/user.model.js :
To make Oauth work in this confirmation, I had to change the datatypes for facebook, google, twitter, and github to
. Since the generator had already created the table model in Postgresq;, I had to either drop that table or manually alter it. I assume this might cause problems with other Sequelize databases, since JSON is in Postgres but not some others. Not sure if it would cause more harm then good to change the generator template in this manner, but it worked for my purpose.
Secondly, I had to manually modify each of the /server/auth/twitter/passport.js type files to match proper sequelize syntax.
in place of the original syntax (mongoose style)
Hope this helps someone else!
The text was updated successfully, but these errors were encountered: