Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
fix: 修复数据库引用
牛文政a435712f0bb3
diff --git a/electron/db/index.ts b/electron/db/index.tsindex 3269a00c..c803a623 100644--- a/electron/db/index.ts+++ b/electron/db/index.ts@@ -22,6 +22,7 @@ import { AutoRunModel } from './models/autoRun';import { AutoRunRecordModel } from './models/autoRunRecord';import { ImgTextModel } from './models/imgText';import { ReplyCommentRecordModel } from './models/replyCommentRecord';+import { InteractionRecordModel } from './models/interactionRecord';const configPath = app.getPath('userData');const database = path.join(configPath, 'database.sqlite');@@ -43,6 +44,7 @@ export const AppDataSource = new DataSource({AutoRunRecordModel,ImgTextModel,ReplyCommentRecordModel,+ InteractionRecordModel,], // 实体或模型表migrations: Object.values(migrations), // 迁移类migrationsRun: true, // 确保在连接时自动运行迁移