mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
downgrade sqlite3 library which has issues with electron build
This commit is contained in:
@@ -13,16 +13,11 @@ const port = require('./port');
|
||||
const Option = require('../entities/option');
|
||||
const TaskContext = require('./task_context.js');
|
||||
|
||||
async function createConnection() {
|
||||
return await sqlite.open({
|
||||
const dbConnection = new Promise(async (resolve, reject) => {
|
||||
const db = await sqlite.open({
|
||||
filename: dataDir.DOCUMENT_PATH,
|
||||
driver: sqlite3.Database
|
||||
});
|
||||
}
|
||||
|
||||
const dbConnection = new Promise(async (resolve, reject) => {
|
||||
// no need to create new connection now since DB stays the same all the time
|
||||
const db = await createConnection();
|
||||
|
||||
db.run('PRAGMA journal_mode = WAL;');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user