I have added a model and a migration file using this command
node_modules/.bin/sequelize model:generate --name User --attributes firstName:string,lastName:string,email:string
Now I wanted to add few more fields like gender and age in to the existing table(model). I changed model manually and fire this command
node_modules/.bin/sequelize db:migrate
But it is responding that "No migrations were executed, database schema was already up to date. "
User.js
'use strict';
module.exports = (sequelize, DataTypes) => {
var User = sequelize.define('User', {
firstName: DataTypes.STRING,
lastName: DataTypes.STRING,
email: DataTypes.STRING
}, {});
User.associate = function(models) {
// associations can be defined here
};
return User;
};
Thank you in advance :)