Skip to main content

synwire_checkpoint_sqlite/
schema.rs

1//! Database schema for the `SQLite` checkpoint backend.
2
3/// SQL statement to create the checkpoints table.
4pub const CREATE_CHECKPOINTS_TABLE: &str = r"
5CREATE TABLE IF NOT EXISTS checkpoints (
6    thread_id TEXT NOT NULL,
7    checkpoint_id TEXT NOT NULL,
8    data BLOB NOT NULL,
9    metadata TEXT NOT NULL,
10    parent_checkpoint_id TEXT,
11    created_at TEXT NOT NULL DEFAULT (datetime('now')),
12    PRIMARY KEY (thread_id, checkpoint_id)
13)
14";