A chill Bluesky bot, with responses powered by Gemini.
at main 1.5 kB view raw
1import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; 2import { sql } from "drizzle-orm"; 3 4export const interactions = sqliteTable("interactions", { 5 id: integer().primaryKey({ autoIncrement: true }), 6 uri: text().unique(), 7 did: text(), 8 post: text(), 9 response: text(), 10 muted: integer({ mode: "boolean" }), 11 created_at: integer({ mode: "timestamp" }).default(sql`CURRENT_TIMESTAMP`), 12}); 13 14export const muted_threads = sqliteTable("muted_threads", { 15 id: integer().primaryKey({ autoIncrement: true }), 16 uri: text().unique(), 17 rkey: text().unique(), 18 muted_at: integer({ mode: "timestamp" }).default(sql`CURRENT_TIMESTAMP`), 19}); 20 21// ? These memory schemas are unused, though they are included in the latest database migrations 22// ? I may add short-term memory support eventually, I did start working on it 23export const memory_blocks = sqliteTable("memory_blocks", { 24 id: integer().primaryKey({ autoIncrement: true }), 25 did: text().notNull(), 26 name: text().notNull().default("memory"), 27 description: text().notNull().default("User memory"), 28 mutable: integer({ mode: "boolean" }).notNull().default(false), 29}); 30 31export const memory_block_entries = sqliteTable("memory_block_entries", { 32 id: integer().primaryKey({ autoIncrement: true }), 33 block_id: integer().notNull().references(() => memory_blocks.id), 34 label: text().notNull(), 35 value: text().notNull(), 36 added_by: text(), 37 created_at: integer({ mode: "timestamp" }).default(sql`CURRENT_TIMESTAMP`), 38});