Closed jhnferraris closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm having the same issue with Node.js v12.16.1. Not really much to add, error is same as in the opening post.
which driver are you using? This is fixed in the latest mysql driver already (2.1.1
)
Yeah, you're right. My bad. I had an older version of the driver which is weird since it was installed this morning but installing the db-migrate-mysql@latest version helped. Should've checked the version number... Thanks
Error: 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 '[ ' (node_modules/mysql/lib/Connection.js:91:28)
at Socket. (node_modules/mysql/lib/Connection.js:525:10)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:182:23)
facility_id
' ]) REFERENCESfacilities
([ 'id
' ]) ON DELETE CASCADE ON U' at line 1 at Query.Sequence._packetToError (node_modules/mysql/lib/protocol/sequences/Sequence.js:47:14) at Query.ErrorPacket (node_modules/mysql/lib/protocol/sequences/Query.js:77:18) at Protocol._parsePacket (node_modules/mysql/lib/protocol/Protocol.js:291:23) at Parser._parsePacket (node_modules/mysql/lib/protocol/Parser.js:433:10) at Parser.write (node_modules/mysql/lib/protocol/Parser.js:43:10) at Protocol.write (node_modules/mysql/lib/protocol/Protocol.js:38:16) at Socket.I tried checking using Node.js v10 and no issue on executing foreign key creation