2
In relation to sequelize
i created a table in my pgadmin named TB_USER
but I have a question when creating the model:
const Sequelize = require('sequelize');
const db = require('../config/dataBase');
const Users = db.define('users', {
title:{
type: Sequelize
}
})
In relation to db.define('users'
would I have to put the table name I created? If I didn’t put the sequelize
will create this table users?
Yes, Sequelize will create the table, in your case, 'userss' with one more’s' at the end, because by default, Sequelize pluralizes the name of all created tables.
– Cmte Cardeal
@Cmtecardeal vlw mano, if you want to add an answer I give vote on it.
– gabriel