#version control
4 messages · Page 1 of 1 (latest)
Hi @rotund mortar. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the knowledge sources, Convex has some built-in version control capabilities for your database, though they're not fully exposed as a user-facing feature yet.
Current Capabilities
Convex internally maintains a transaction log that stores all versions of documents within the database. Each version of a document contains a monotonically increasing timestamp that acts like a version number. This transaction log is an append-only data structure that records all changes to your database over time.
As mentioned by a Convex team member in a Discord thread:
"We don't expose this yet, but we have some vague plans in the future to provide a high-performance CDC (change data capture) API using our transaction log" Discord support thread: Database row version history?
Available Options
While waiting for native version history features, you have a few options:
-
Backups: Convex provides backup functionality that creates consistent snapshots of your table data and file storage. You can take manual backups or schedule periodic backups (with a Pro plan).
Database Backups and Restore -
Streaming Export API: You can use the streaming export API to get a snapshot of a table and changes made to it (if the timestamp is within the past month).
-
Custom Solution: You can implement your own version history tracking by using a component like the table-history component mentioned in the Discord thread.
-
Third-party Integration: You can set up Change Data Capture (CDC) with tools like Airbyte or Fivetran.
Future Possibilities
The Convex team has mentioned that they have plans to provide better version control features in the future. A community member noted that this would enable "Redux-like time travel experience (but server side), where I would be able to restore the exact state of the app at any point in time."