mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
becca conversion WIP
This commit is contained in:
parent
3091119893
commit
e257634ccf
@ -1,2 +1,3 @@
|
||||
- drop branches.utcDateCreated - not used for anything
|
||||
- drop options.utcDateCreated - not used for anything
|
||||
- isDeleted = 0 by default
|
||||
|
@ -42,7 +42,7 @@ function getStats() {
|
||||
}
|
||||
|
||||
const stats = {
|
||||
initialized: optionService.getOption('initialized') === 'true',
|
||||
initialized: sql.getValue("SELECT value FROM options WHERE name = 'initialized'") === 'true',
|
||||
outstandingPullCount: syncService.getOutstandingPullCount()
|
||||
};
|
||||
|
||||
|
@ -120,7 +120,8 @@ class Attribute extends AbstractEntity {
|
||||
position: this.position,
|
||||
value: this.value,
|
||||
isInheritable: this.isInheritable,
|
||||
utcDateModified: dateUtils.utcNowDateTime()
|
||||
utcDateModified: dateUtils.utcNowDateTime(),
|
||||
isDeleted: false
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ const mimeService = require("./mime");
|
||||
const treeService = require("../tree");
|
||||
const yauzl = require("yauzl");
|
||||
const htmlSanitizer = require('../html_sanitizer');
|
||||
const becca = require("../becca/becca.js");
|
||||
|
||||
/**
|
||||
* @param {TaskContext} taskContext
|
||||
|
@ -32,7 +32,8 @@ function isDbInitialized() {
|
||||
|
||||
async function initDbConnection() {
|
||||
if (!isDbInitialized()) {
|
||||
log.info(`DB not initialized, please visit setup page` + (utils.isElectron() ? '' : ` - http://[your-server-host]:${await port} to see instructions on how to initialize Trilium.`));
|
||||
log.info(`DB not initialized, please visit setup page` +
|
||||
(utils.isElectron() ? '' : ` - http://[your-server-host]:${await port} to see instructions on how to initialize Trilium.`));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -59,8 +60,10 @@ async function createInitialDatabase(username, password, theme) {
|
||||
sql.transactional(() => {
|
||||
sql.executeScript(schema);
|
||||
|
||||
const Note = require("../entities/note");
|
||||
const Branch = require("../entities/branch");
|
||||
require("./becca/becca_loader").load();
|
||||
|
||||
const Note = require("./becca/entities/note");
|
||||
const Branch = require("./becca/entities/branch");
|
||||
|
||||
rootNote = new Note({
|
||||
noteId: 'root',
|
||||
|
Loading…
x
Reference in New Issue
Block a user