mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
it's now possible to mark relation as inheritable (previously this was hardcoded for specific relation names)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
const build = require('./build');
|
||||
const packageJson = require('../../package');
|
||||
|
||||
const APP_DB_VERSION = 106;
|
||||
const APP_DB_VERSION = 107;
|
||||
const SYNC_VERSION = 1;
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -46,7 +46,8 @@ async function getEffectiveRelations(noteId) {
|
||||
JOIN notes ON notes.noteId = branches.parentNoteId
|
||||
WHERE notes.isDeleted = 0 AND branches.isDeleted = 0
|
||||
)
|
||||
SELECT relations.* FROM relations JOIN tree ON relations.sourceNoteId = tree.noteId WHERE relations.isDeleted = 0 AND relations.name IN ('runOnNoteView')`, [noteId]);
|
||||
SELECT relations.* FROM relations JOIN tree ON relations.sourceNoteId = tree.noteId
|
||||
WHERE relations.isDeleted = 0 AND (relations.isInheritable = 1 OR relations.sourceNoteId = ?)`, [noteId, noteId]);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
@@ -40,7 +40,7 @@ async function updateEntity(sync, entity, sourceId) {
|
||||
await updateApiToken(entity, sourceId);
|
||||
}
|
||||
else {
|
||||
throw new Error(`Unrecognized entity type ${sync}`);
|
||||
throw new Error(`Unrecognized entity type ${entityName}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user