mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 10:55:55 +01:00
bookmark migration
This commit is contained in:
16
db/migrations/0204__migrate_bookmarks_to_clones.js
Normal file
16
db/migrations/0204__migrate_bookmarks_to_clones.js
Normal file
@@ -0,0 +1,16 @@
|
||||
module.exports = () => {
|
||||
const cls = require("../../src/services/cls");
|
||||
const cloningService = require("../../src/services/cloning");
|
||||
const beccaLoader = require("../../src/becca/becca_loader");
|
||||
const becca = require("../../src/becca/becca");
|
||||
|
||||
cls.init(() => {
|
||||
beccaLoader.load();
|
||||
|
||||
for (const attr of becca.findAttributes('label','bookmarked')) {
|
||||
cloningService.toggleNoteInParent(true, attr.noteId, 'lb_bookmarks');
|
||||
|
||||
attr.markAsDeleted("0204__migrate_bookmarks_to_clones");
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user