downgrade sqlite patch version to solve I couldn't build successfully in electron TryGhost/node-sqlite3 #1746

This commit is contained in:
geekgeekrun
2024-03-21 10:06:44 +08:00
parent 1df215abb3
commit 646045fad5
3 changed files with 74 additions and 114 deletions

View File

@@ -13,6 +13,8 @@ import { JobInfoChangeLog } from "./entity/JobInfoChangeLog";
import { BossActiveStatusRecord } from "./entity/BossActiveStatusRecord";
import { UserInfo } from "./entity/UserInfo";
import sqlite3 from 'sqlite3';
function initDb(dbFilePath) {
const { DataSource } = requireTypeorm()
const appDataSource = new DataSource({
@@ -21,6 +23,7 @@ function initDb(dbFilePath) {
logging: true,
logger: "simple-console",
database: dbFilePath,
driver: sqlite3, // The important line
entities: [
ChatStartupLog,
BossInfo,