{"action":"created","issue":{"url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1860","repository_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack","labels_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1860/labels{/name}","comments_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1860/comments","events_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1860/events","html_url":"https://github.com/angular-fullstack/generator-angular-fullstack/issues/1860","id":153324661,"number":1860,"title":"Error when generating Users table in MySql","user":{"login":"Demonium","id":9486257,"avatar_url":"https://avatars.githubusercontent.com/u/9486257?v=3","gravatar_id":"","url":"https://api.github.com/users/Demonium","html_url":"https://github.com/Demonium","followers_url":"https://api.github.com/users/Demonium/followers","following_url":"https://api.github.com/users/Demonium/following{/other_user}","gists_url":"https://api.github.com/users/Demonium/gists{/gist_id}","starred_url":"https://api.github.com/users/Demonium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demonium/subscriptions","organizations_url":"https://api.github.com/users/Demonium/orgs","repos_url":"https://api.github.com/users/Demonium/repos","events_url":"https://api.github.com/users/Demonium/events{/privacy}","received_events_url":"https://api.github.com/users/Demonium/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-05T20:58:17Z","updated_at":"2016-05-05T21:21:56Z","closed_at":"2016-05-05T21:21:56Z","body":"I have connected NodeJs to my MySql Database, the script to create the table Users fail with the below error:\r\n\r\n> ==== C stack trace ===============================\r\n> \r\n>  1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)\r\n>  2: init(v8::Local<v8::Object>)\r\n>  3: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)\r\n>  4: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))\r\n>  5: 0x98b90b\r\n>  6: 0x98beb1\r\n>  7: 0x124f4c80961b\r\n> Executing (default): CREATE TABLE IF NOT EXISTS `Things` (`_id` INTEGER NOT NULL auto_increment , `name` VARCHAR(255), `info` VARCHAR(255), `active` TINYINT(1), `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`_id`)) ENGINE=InnoDB;\r\n> Executing (default): CREATE TABLE IF NOT EXISTS `Users` (`_id` INTEGER NOT NULL auto_increment , `name` VARCHAR(255), `email` VARCHAR(255), `role` VARCHAR(255) DEFAULT 'user', `password` VARCHAR(255), `provider` VARCHAR(255), `salt` VARCHAR(255), `facebook` JSON, `twitter` JSON, `google` JSON, `github` JSON, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, UNIQUE `Users_email_unique` (`email`), PRIMARY KEY (`_id`)) ENGINE=InnoDB;\r\n> Unhandled rejection SequelizeDatabaseError: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JSON, `twitter` JSON, `google` JSON, `github` JSON, `createdAt` DATETIME NOT NUL' at line 1\r\n>     at Query.formatError (/home/djo/apps/pensieve/node_modules/sequelize/lib/dialects/mysql/query.js:175:14)\r\n>     at Query._callback (/home/djo/apps/pensieve/node_modules/sequelize/lib/dialects/mysql/query.js:49:21)\r\n>     at Query.Sequence.end (/home/djo/apps/pensieve/node_modules/mysql/lib/protocol/sequences/Sequence.js:96:24)\r\n>     at Query.ErrorPacket (/home/djo/apps/pensieve/node_modules/mysql/lib/protocol/sequences/Query.js:94:8)\r\n>     at Protocol._parsePacket (/home/djo/apps/pensieve/node_modules/mysql/lib/protocol/Protocol.js:280:23)\r\n>     at Parser.write (/home/djo/apps/pensieve/node_modules/mysql/lib/protocol/Parser.js:73:12)\r\n>     at Protocol.write (/home/djo/apps/pensieve/node_modules/mysql/lib/protocol/Protocol.js:39:16)\r\n>     at Socket.<anonymous> (/home/djo/apps/pensieve/node_modules/mysql/lib/Connection.js:96:28)\r\n>     at emitOne (events.js:96:13)\r\n>     at Socket.emit (events.js:188:7)\r\n>     at readableAddChunk (_stream_readable.js:172:18)\r\n>     at Socket.Readable.push (_stream_readable.js:130:10)\r\n>     at TCP.onread (net.js:535:20)\r\n> From previous event:\r\n>     at Query.run (/home/djo/apps/pensieve/node_modules/sequelize/lib/dialects/mysql/query.js:39:17)\r\n>     at /home/djo/apps/pensieve/node_modules/sequelize/lib/sequelize.js:844:20\r\n>     at /home/djo/apps/pensieve/node_modules/retry-as-promised/index.js:38:21\r\n> From previous event:\r\n>     at retryAsPromised (/home/djo/apps/pensieve/node_modules/retry-as-promised/index.js:27:10)\r\n>     at .<anonymous> (/home/djo/apps/pensieve/node_modules/sequelize/lib/sequelize.js:843:12)\r\n> From previous event:\r\n>     at Promise.then (/home/djo/apps/pensieve/node_modules/sequelize/lib/promise.js:21:17)\r\n>     at Model.sync (/home/djo/apps/pensieve/node_modules/sequelize/lib/model.js:1008:6)\r\n>     at Object.<anonymous> (seed.js:46:6)\r\n>     at Module._compile (module.js:541:32)\r\n>     at loader (/home/djo/apps/pensieve/node_modules/babel-register/lib/node.js:126:5)\r\n>     at Object.require.extensions.(anonymous function) [as .js] (/home/djo/apps/pensieve/node_modules/babel-register/lib/node.js:136:7)\r\n>     at Module.load (module.js:456:32)\r\n>     at tryModuleLoad (module.js:415:12)\r\n>     at Function.Module._load (module.js:407:3)\r\n>     at Module.require (module.js:466:17)\r\n>     at require (internal/module.js:20:19)\r\n>     at Object.<anonymous> (app.js:13:22)\r\n>     at Module._compile (module.js:541:32)\r\n>     at loader (/home/djo/apps/pensieve/node_modules/babel-register/lib/node.js:126:5)\r\n>     at Object.require.extensions.(anonymous function) [as .js] (/home/djo/apps/pensieve/node_modules/babel-register/lib/node.js:136:7)\r\n>     at Module.load (module.js:456:32)\r\n>     at tryModuleLoad (module.js:415:12)\r\n>     at Function.Module._load (module.js:407:3)\r\n>     at Module.require (module.js:466:17)\r\n> \r\n\r\nCould you please fix it"},"comment":{"url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/comments/217283846","html_url":"https://github.com/angular-fullstack/generator-angular-fullstack/issues/1860#issuecomment-217283846","issue_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1860","id":217283846,"user":{"login":"Demonium","id":9486257,"avatar_url":"https://avatars.githubusercontent.com/u/9486257?v=3","gravatar_id":"","url":"https://api.github.com/users/Demonium","html_url":"https://github.com/Demonium","followers_url":"https://api.github.com/users/Demonium/followers","following_url":"https://api.github.com/users/Demonium/following{/other_user}","gists_url":"https://api.github.com/users/Demonium/gists{/gist_id}","starred_url":"https://api.github.com/users/Demonium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Demonium/subscriptions","organizations_url":"https://api.github.com/users/Demonium/orgs","repos_url":"https://api.github.com/users/Demonium/repos","events_url":"https://api.github.com/users/Demonium/events{/privacy}","received_events_url":"https://api.github.com/users/Demonium/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T21:21:56Z","updated_at":"2016-05-05T21:21:56Z","body":"Can Close find the solution, in the declaration of the Users model the line below must be changed with \r\n    facebook: DataTypes.STRING,\r\n    twitter: DataTypes.STRING,\r\n    google: DataTypes.STRING,\r\n    github: DataTypes.STRING\r\n"}}