Can we generate model using a migration file ? i have created migrations file . i want to genrate corresponding model file using it ? is it possible in node sequlizer ?
This is my one of migration file :
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('Vendors', {
id: {
allowNull: false,
primaryKey: true,
type: Sequelize.UUID,
defaultValue: Sequelize.UUIDV1
},
firstName: {
type: Sequelize.STRING
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('Vendors');
}
}; ```
i know it is possible to generate migration using given model file . Can we do the opposite of that ?