Disable primary key in Sequelize JS

Is there a way to disable the automatically generated primary key inside Sequelize JS?

We create our tables inside PostgreSQL using the Sequelize sync method. But we have a problem with our connection tables .... We do not want to have a primary key in our connection table, but Sequelize generates it automatically if we do not specify one of us. I can specify a primary key for all columns, but this is not the best way to do this ....

Anyone who knows how to disable primary keys inside Sequelize JS?

+4
source share
1 answer
Model.removeAttribute("id");

Additional documentation removeAttribute

0

All Articles