mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
cleanup of hidden notes
This commit is contained in:
@@ -1 +0,0 @@
|
||||
module.exports = () => console.log("NOOP, increased because of new note type");
|
||||
10
db/migrations/0198__create_hidden_subtree.js
Normal file
10
db/migrations/0198__create_hidden_subtree.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = () => {
|
||||
const specialNotesService = require('../../src/services/special_notes');
|
||||
const cls = require("../../src/services/cls");
|
||||
const beccaLoader = require("../../src/becca/becca_loader");
|
||||
|
||||
cls.init(() => {
|
||||
beccaLoader.load();
|
||||
specialNotesService.getHiddenRoot();
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE branches SET parentNoteId = 'hidden' WHERE noteId = 'globalnotemap';
|
||||
3
db/migrations/0201__set_branch_id_in_hidden_subtree.sql
Normal file
3
db/migrations/0201__set_branch_id_in_hidden_subtree.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
UPDATE branches SET branchId = 'search' WHERE parentNoteId = 'hidden' AND noteId = 'search';
|
||||
UPDATE branches SET branchId = 'globalnotemap' WHERE parentNoteId = 'hidden' AND noteId = 'globalnotemap';
|
||||
UPDATE branches SET branchId = 'sqlconsole' WHERE parentNoteId = 'hidden' AND noteId = 'sqlconsole';
|
||||
6
db/migrations/0202__delete_singles_special_note.sql
Normal file
6
db/migrations/0202__delete_singles_special_note.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
DELETE FROM branches WHERE noteId = 'singles';
|
||||
DELETE FROM notes WHERE noteId = 'singles';
|
||||
DELETE FROM note_contents WHERE noteId = 'singles';
|
||||
DELETE FROM note_revisions WHERE noteId = 'singles';
|
||||
DELETE FROM attributes WHERE noteId = 'singles';
|
||||
DELETE FROM entity_changes WHERE entityId = 'singles';
|
||||
Reference in New Issue
Block a user