Skip to content
File

Blob: src/worker/db/docsync-do/schema.ts

typescript15 lines
1import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
2import { sqliteBytes } from "@/worker/db/sqlite";
3 
4export const snapshotMeta = sqliteTable("snapshot_meta", {
5 id: integer("id").primaryKey(),
6 chunk_count: integer("chunk_count").notNull(),
7 total_bytes: integer("total_bytes").notNull(),
8 snapshot_at: text("snapshot_at").notNull(),
9});
10 
11export const snapshotChunks = sqliteTable("snapshot_chunks", {
12 chunk_index: integer("chunk_index").primaryKey(),
13 data: sqliteBytes("data").notNull(),
14});