File
Blob: src/worker/db/docsync-do/schema.ts
| 1 | import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core"; |
| 2 | import { sqliteBytes } from "@/worker/db/sqlite"; |
| 3 | |
| 4 | export 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 | |
| 11 | export const snapshotChunks = sqliteTable("snapshot_chunks", { |
| 12 | chunk_index: integer("chunk_index").primaryKey(), |
| 13 | data: sqliteBytes("data").notNull(), |
| 14 | }); |