refactor: migrate messageStore to drizzle-orm
- Replace all raw SQL queries in messageStore.ts with Drizzle ORM queries - Remove DatabaseAdapter dependency from messageStore functions - Update all function signatures to be async and remove db parameter - Functions now use getDatabase() internally for database access - Update all call sites in messageCapture.ts, attachmentUploader.ts, aiAnalyzer.ts, webserver.ts, and index.ts - All functions remain backward compatible in behavior - TypeScript typecheck passes with no errors - All tests pass (11 passed)
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@ async function initializeApp() {
|
||||
client.on("ready", async () => {
|
||||
logger.info({ user: client.user?.tag }, "Bot logged in");
|
||||
registerMessageCapture(client, db!);
|
||||
startPendingAIAnalysisWorker(db!);
|
||||
startPendingAIAnalysisWorker();
|
||||
syncBacklogMessages(client, db!).catch((error) => {
|
||||
logger.warn({ error }, "Backlog sync failed");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user