I read this similar question: Sequelize Unknown column '*.createdAt' in 'field list'
but the solution doesn't work for me! Why? This is my code:
var User = sequelize.define("User", {
id: {
type: DataTypes.UUID,
primaryKey: true
},
cognome: DataTypes.STRING,
nome: DataTypes.STRING,
email: DataTypes.STRING,
password: DataTypes.TEXT,
stato: DataTypes.INTEGER,
ruolo: DataTypes.INTEGER
}, {
freezeTableName: true
}, {
timestamps: false
});
the error is:
Executing (default): SELECT `id`, `cognome`, `nome`, `email`, `data_nascita`, `password`, `cellulare`, `stato`, `blacklist`, `createdAt`, `updatedAt` FROM `Candidato` AS `Candidato`;
Unhandled rejection SequelizeDatabaseError: ER_BAD_FIELD_ERROR: Unknown column 'createdAt' in 'field list'