When using Sequelize.js, the following code doesn\'t add any foreign key on tables.
var MainDashboard = sequelize.define(\'main_dashboard\', {
title: Sequ
It's amazingly simple.
const MainDashboard = this.sequelize.define('main_dashboard', {/* attributes */})
, MainClient = this.sequelize.define('main_client', {/* attributes */});
MainDashboard.belongsTo(MainClient, { foreignKey: 'clientId' }); // Adds clientId to MainDashboard
It will link this as a foreign key and you may use it as an association. Let me know if I'm missing anything.