I'm having problems in creating a trigger using Node.js + Express + Sequelize.
I have tables for my model objects (i.e. User, Device, ...) and join tables to express their Many-to-Many associations (i.e. hasDevice).
My troubles come from my inability in creating a simple trigger with a
sequelize.query('query', null, {raw: true});
since tables creation is totally asynchronous and I cannot know when trigger's table will be created (In particular I'm getting the following error:
Possibly unhandled SequelizeDatabaseError: ER_NO_SUCH_TABLE: Table 'express612.hasDevice' doesn't exist
Thanks in advance for your help.
.thencallback after.sync