I'm currently migrating a Rails application running with Mongodb to move to Psql. There are some roadblocks and this is one of them that I'm investigating solutions for. Is there a way to set expiration index on a model attribute or an alternative solution to achieve similar functionality? This is how we have implemented in Mongo,
field :impersonate_token
index({ impersonate_token: 1 }, expire_after_seconds: 60)
This is a custom token with :impersonatable by devise. Please share if you know of a way to achieve this with Postgres.
Thank you.