mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-07-31 10:46:59 +08:00
change sqlite backend; upgrade electron; fix ipc file cannot listen in macOS
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
"cli-highlight": "^2.1.11",
|
||||
"lodash": "^4.17.21",
|
||||
"reflect-metadata": "^0.2.1",
|
||||
"sqlite3": "5.1.6",
|
||||
"typeorm": "0.3.11"
|
||||
"better-sqlite3": "12.6.2",
|
||||
"typeorm": "0.3.28"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash": "^4.17.23",
|
||||
|
||||
@@ -21,7 +21,6 @@ import { ChatMessageRecord } from './entity/ChatMessageRecord'
|
||||
import { LlmModelUsageRecord } from './entity/LlmModelUsageRecord'
|
||||
import { JobHireStatusRecord } from './entity/JobHireStatusRecord'
|
||||
|
||||
import sqlite3 from 'sqlite3';
|
||||
import {
|
||||
saveChatStartupRecord,
|
||||
saveJobInfoFromRecommendPage,
|
||||
@@ -45,12 +44,11 @@ import * as typeorm from 'typeorm'
|
||||
export function initDb(dbFilePath) {
|
||||
const { DataSource } = typeorm
|
||||
const appDataSource = new DataSource({
|
||||
type: "sqlite",
|
||||
type: "better-sqlite3",
|
||||
synchronize: false,
|
||||
logging: true,
|
||||
logger: "simple-console",
|
||||
database: dbFilePath,
|
||||
driver: sqlite3, // The important line
|
||||
entities: [
|
||||
ChatStartupLog,
|
||||
BossInfo,
|
||||
|
||||
Reference in New Issue
Block a user