Ifeora-emeka
Ifeora-emeka

Reputation: 117

Table does not exist Sequelize

I created a customer model, then this is the model

then i tried to insert data into it sequelize command

after i sent the post request to add the data here is what I got sequelize error the name of the model and table is customer (singular) but sequelize is looking for customers (plural).

Upvotes: 1

Views: 3687

Answers (1)

Gompro
Gompro

Reputation: 2315

Ok, the problem is if you want singular table name other than auto generated plural name, you should update Sequelize configuration.

You can checkout this question and its answer.

Upvotes: 3

Related Questions