Add some fields automatically to all the migrations in prisma

Viewed 52

I have around 20 data models and all these models needs createdAt and updatedAt fields. Is there anyway to add these fields automatically for existing and future models when I run prisma migrate command.

1 Answers

It's not currently possible to automatically add a createdAt and updatedAt field automatically to all the models.

If you can create a Feature Request explaining your use case, prisma's engineering and product team can have a look and can prioritise it if other people also require the functionality.

Related