cleanup of hidden notes

This commit is contained in:
zadam
2022-11-06 15:18:32 +01:00
parent 3122d0cc6b
commit c92b451033
9 changed files with 27 additions and 21 deletions

View File

@@ -1 +0,0 @@
module.exports = () => console.log("NOOP, increased because of new note type");

View 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();
});
};

View File

@@ -0,0 +1 @@
UPDATE branches SET parentNoteId = 'hidden' WHERE noteId = 'globalnotemap';

View 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';

View 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';