Auto delete record using timestamp

How to auto delete a record using timestamp and do a function when delete
7 Replies
Angelelz
Angelelz10mo ago
If you want to do it at the database level, look up triggers and stored procedures
Kai Revona
Kai RevonaOP10mo ago
how to do that
Angelelz
Angelelz10mo ago
Those are extensive topics, not supported by drizzle yet. But there's plenty of resources out there
Kai Revona
Kai RevonaOP10mo ago
thanks
francis
francis10mo ago
a note: you probably don't actually want to do this at a database level. alternative strategies: using a view to hide records with a expires_at timestamp prior to the current time, for example: or using a cron operation to clean out the tables on a regular schedule, if that is desired
Kai Revona
Kai RevonaOP10mo ago
But i don't know how to do that
francis
francis10mo ago
well, do research, we can't help you with that part. nothing here is drizzle specific.
Want results from more Discord servers?
Add your server