Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/dofs/src/schema/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ export const SYNC_STATEMENTS = [
path TEXT,
PRIMARY KEY (k, backend)
)`,
// Local revs minted by applying a pull from `backend`. A node whose
// rev is listed here still holds exactly what that backend sent, so
// a later delete from the same backend may remove it before the echo
// push. Rows at or below the push cursor are pruned. Created by the
// baseline DDL on every boot, so existing databases gain it without
// a migration.
`CREATE TABLE IF NOT EXISTS _vfs_upstream_revs (
backend TEXT NOT NULL,
rev INTEGER NOT NULL,
PRIMARY KEY (backend, rev)
) WITHOUT ROWID`,
// Durable half of a restartable sync operation. One row per
// (backend, direction): the plan's key. A restarted iterator reads
// this row to recover the fixed target and generation it was working
Expand Down
Loading
Loading