mySQL DB Issues on startup

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
23 Jan 2015 01:19 - 23 Jan 2015 01:20 #1 by Trekkan
mySQL DB Issues on startup was created by Trekkan
I'm now getting the following two errors. Looks like maybe something was missed in the initial SQL build of the database?
Thu Jan 22 17:13:48 act.info indexed mobs: 2614
Possibly unhandled SequelizeDatabaseError: ER_BAD_FIELD_ERROR: Unknown column 'items.UserId' in 'field list'
    at module.exports.Query.formatError (g:\Data\dev\uu2\Havoc\node_modules\sequelize\lib\dialects\mysql\query.js:159:16)
    at Query.module.exports.Query.run [as _callback] (g:\Data\dev\uu2\Havoc\node_modules\sequelize\lib\dialects\mysql\query.js:38:23)
    at Query.Sequence.end (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\sequences\Sequence.js:96:24)
    at Query.ErrorPacket (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\sequences\Query.js:93:8)
    at Protocol._parsePacket (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\Protocol.js:271:23)
    at Parser.write (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\Parser.js:77:12)
    at Protocol.write (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\Protocol.js:39:16)
    at Socket.Connection.connect (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\Connection.js:82:28)
    at Socket.emit (events.js:95:17)
    at Socket.stream.pause.paused (_stream_readable.js:765:14)
Thu Jan 22 17:13:48 tem.init: finished indexing item prototypes: 17
Thu Jan 22 17:13:48 item.updateProcs: re-init procs on existing online items
Possibly unhandled SequelizeDatabaseError: ER_BAD_FIELD_ERROR: Unknown column 'UserId' in 'field list'
    at module.exports.Query.formatError (g:\Data\dev\uu2\Havoc\node_modules\sequelize\lib\dialects\mysql\query.js:159:16)
    at Query.module.exports.Query.run [as _callback] (g:\Data\dev\uu2\Havoc\node_modules\sequelize\lib\dialects\mysql\query.js:38:23)
    at Query.Sequence.end (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\sequences\Sequence.js:96:24)
    at Query.ErrorPacket (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\sequences\Query.js:93:8)
    at Protocol._parsePacket (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\Protocol.js:271:23)
    at Parser.write (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\Parser.js:77:12)
    at Protocol.write (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\protocol\Protocol.js:39:16)
    at Socket.Connection.connect (g:\Data\dev\uu2\Havoc\node_modules\mysql\lib\Connection.js:82:28)
    at Socket.emit (events.js:95:17)
    at Socket.stream.pause.paused (_stream_readable.js:765:14)
Last edit: 23 Jan 2015 01:20 by Trekkan. Reason: Added in CODE tags

Please Log in or Create an account to join the conversation.

More
23 Jan 2015 02:26 #2 by plamzi
Replied by plamzi on topic mySQL DB Issues on startup
It sounds like you opted out of importing the included schema and let it create a blank one?

If so, you may have to manually create some table columns, or (better) find out why they are not getting created by node sequelize.

Please Log in or Create an account to join the conversation.

  • Trekkan
  • Trekkan's Avatar Topic Author
  • Offline
  • New Member
More
23 Jan 2015 02:28 #3 by Trekkan
Replied by Trekkan on topic mySQL DB Issues on startup
Nope, I imported the included one. I have all of the test data, etc. I did manually create the "UserId" field in the "items" table though and got further

Please Log in or Create an account to join the conversation.

More
23 Jan 2015 13:28 #4 by plamzi
Replied by plamzi on topic mySQL DB Issues on startup
Sounds like I may have added some fields after exporting the initial schema for git, and it will need to be updated. Thanks for reporting.

FYI, there's a switch in config.js that enables you to log all db queries. It's also possible to set debug on and off dynamically in code by calling db.debug(1) and db.debug(0).

Please Log in or Create an account to join the conversation.