Prisma 1 Question - Does anyone know if there’s a ...
# orm-help
c
Prisma 1 Question - Does anyone know if there’s a way to add a “DELETE hook”. What I mean by this, is if an row in my
Images
table is deleted, I want a script to be kicked off to make a call to my AWS Lambda image service to remove that item from S3 bucket so I’m not storing an image with no references. Obviously I can write some logic around this and add it to every place which may cascade into row being removed from Images but it would be a lot easier if I could just hook into it somehow. Thanks!
r
Hey @Corey Snyder 👋 Currently there's no support for hooks that fire on DELETE so you would have to do that manually.
c
@Ryan Thanks for the info!
👍 1