Right now i mostly use convex where realtime state occurs. Most of my tables therefore contain fairly ephemeral records that after use I get rid of.
However, it'd be really helpful to be able to persist them in case i later need them for auditing purposes. For now I do this by pumping them to postgres and putting them in some storage tables. This is a good solution but I was wondering if convex provided any out of hte box functionality to do this. Right now the options I see to do this are
- Define backup tables in convex (ie if you have a table
articlesyou could have another tablearchived_articles). - Push to your own db layer (postgres, mysql, etc)
However, option 1 makes the schema start to look really polluted. If convex had some functionality for this that could auto handle it that would be amazing (seems like a good candidate for the pro plan!). Basically i'm imagining convex has implicit schemas for all tables that are considered backup tables, and maybe some other functionality like in your schema you could define a ttl with a persistOnDelete option. I dunno though, maybe that's too messy. Just food for thought