DEV Community

Discussion on: Modifying an existing sequelize migration

Collapse
 
hitarth1 profile image
Hitarth1

How to perform soft delete in sequelize?

Collapse
 
rogereiddir profile image
rogeraidr

don't forget to add deletedAt column

Collapse
 
anayooleru profile image
Anayo Samson Oleru

Hi Hitarth1, you need to define a model as a paranoid. You can do that by passing theparanoid: true option when you're defining your model. And make sure timestamps is not false. Paranoid needs timestamp to work.