To create or update with Node Sequelize, we use the upsert method.
For instance, we write
User.upsert({ a: "a", b: "b", username: "john" });
to call upsert with an object with the value to create or update.
It’ll look for the item to update by the primary key.