Here is the gist of the problem.
I have a table "Boxes". There are multiple tables of items that can be associated with a box ("Widgets", "Dohickies", "Thingamabobs").
I have a relational table, "ItemsInBox", with BoxId, ItemId, itemType.
In my models, I create the associations (belongsToMany, hasMany) using the "ItemsInBox" as a "through" table, but there are no actual foreign keys associated with the various items tables as it would cause foreign key conflicts. All of that works fine.
The problem is that when I am writing tests for the models, I use sequelize.sync() to generate the tables. Sync() automatically adds foreign keys for all of the associations.
I can't use the "references" property in the model definitions to create the associations because the "Boxes" table would need to be able to reference 3 different tables, but the references property cannot be an array as far as I can tell.
Is there a way to tell sequelize.sync() to skip adding foreign keys for specific associations?
Note: Currently using sequelize v3, but working on upgrading to v5.