SequelizeDatabaseError when using MySQL db
Closed this issue · 3 comments
thomasfaller commented
Expected behavior
Working
Actual behavior
TODO: When I launch the following command:
$ docker run \
-v `pwd`:/usr/src/app --init \
-e DATABASE_URL=mysql://username:password@host.docker.internal:32768/healthwave_master \
-e DATABASE_SSL=false \
-e APP_NAME=hw_admin \
-e FOREST_EMAIL=xxxxxxxxx@xxxxxxxx.xx \
-ti forestadmin/lumber-forestadmin
Failure Logs
{ SequelizeDatabaseError: Table 'healthwave_master.public.addressLog' doesn't exist
at Query.formatError (/usr/local/lib/node_modules/lumber-cli/node_modules/sequelize/lib/dialects/mysql/query.js:222:16)
at Query.connection.query [as onResult] (/usr/local/lib/node_modules/lumber-cli/node_modules/sequelize/lib/dialects/mysql/query.js:55:23)
at Query.Command.execute (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/commands/command.js:30:12)
at Connection.handlePacket (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:515:28)
at PacketParser.onPacket (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:94:16)
at PacketParser.executeStart (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/packet_parser.js:77:14)
at Socket.<anonymous> (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:102:29)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
name: 'SequelizeDatabaseError',
parent:
{ Error: Table 'healthwave_master.public.addressLog' doesn't exist
at Packet.asError (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/packets/packet.js:703:13)
at Query.Command.execute (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/commands/command.js:28:22)
at Connection.handlePacket (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:515:28)
at PacketParser.onPacket (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:94:16)
at PacketParser.executeStart (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/packet_parser.js:77:14)
at Socket.<anonymous> (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:102:29)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
code: 'ER_NO_SUCH_TABLE',
errno: 1146,
sqlState: '#42S02',
sql: 'DESCRIBE `public.addressLog`;' },
original:
{ Error: Table 'healthwave_master.public.addressLog' doesn't exist
at Packet.asError (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/packets/packet.js:703:13)
at Query.Command.execute (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/commands/command.js:28:22)
at Connection.handlePacket (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:515:28)
at PacketParser.onPacket (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:94:16)
at PacketParser.executeStart (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/packet_parser.js:77:14)
at Socket.<anonymous> (/usr/local/lib/node_modules/lumber-cli/node_modules/mysql2/lib/connection.js:102:29)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:288:12)
at readableAddChunk (_stream_readable.js:269:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
code: 'ER_NO_SUCH_TABLE',
errno: 1146,
sqlState: '#42S02',
sql: 'DESCRIBE `public.addressLog`;' },
sql: 'DESCRIBE `public.addressLog`;' }
This is being output after the Lumber package and the install goes through. Maybe it's just a warning. Is it because I'm using an old version of MySQL (5.5.62) ?
Context
TODO: Please provide any relevant information about your setup.
- Lumber Package Version: lumber-forestadmin@1.2.1
- Database Dialect: mysql
- Database Version: 5.5.62 (via Docker image)
fredcalvez commented
Same issue for me - the SQL would works if no 'public'
rap2hpoutre commented
Hi @thomasfaller & @fredcalvez. Thank you for your feedback. The issue about schema (e.g public
) in MySQL has been fixed in the latest versions of Lumber. Could you try again with a fresh install? (with up-to-date docker image or lumber
version).
rap2hpoutre commented
I close this issue for now since it has been fixed in latest release. Let me know it you still have the problem and I will re-open it!