Combine these tables together (Figure Travis Saylor on Pexels)

Why use a foreign key?

Creating a transfer

Recent PK, FKs and indices
Even more PK, FK and indices
'use strict';
let tableModel = { schema: 'app', tableName: 'countries' };
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.removeColumn(tableModel, 'Capital')
},
down: async (queryInterface, Sequelize) => {
await queryInterface.addColumn(tableModel, 'Capital', {
allowNull: true, type: Sequelize.STRING });
}
};

LEAVE A REPLY

Please enter your comment!
Please enter your name here