Am a newbie to Postgres and Sequelize i have successfully connected to DB trying to create a table in DB that is where am struck am getting an error the tablename doesn't exist
sequelize.authenticate().then(() => {
console.log("Success!");
var News = sequelize.define('likes', {
title: {
type: Sequelize.STRING
},
content: {
type: Sequelize.STRING
}
}, {
freezeTableName: true
});
News.create({
title: 'Getting Started with PostgreSQL and Sequelize',
content: 'Hello there'
});
News.findAll({}).then((data) => {
console.log(data);
}).catch((err) => {
console.log(err);
});
}).catch((err) => {
console.log(err);
});
Where am making a mistake? It says error: relation "likes" doesn't exist. Any kind of help is appreciated