Skip to content

Build your personal knowledge base with Trilium Notes

Merge remote-tracking branch 'upstream/master' into share

Zack Rauena3540772dd47
diff --cc bin/tpl/anonymize-database.sql
index 231be94b1b,ff935d6e1d..86615370f8
--- a/bin/tpl/anonymize-database.sql
+++ b/bin/tpl/anonymize-database.sql
@@@ -4,166 -3,45 +3,45 @@@ UPDATE notes SET title = 'title' WHERE
UPDATE blobs SET content = 'text' WHERE content IS NOT NULL;
UPDATE revisions SET title = 'title';
- UPDATE attributes SET name = 'name', value = 'value'
- WHERE type = 'label'
- AND name NOT IN ('inbox',
- 'disableVersioning',
- 'calendarRoot',
- 'archived',
- 'excludeFromExport',
- 'disableInclusion',
- 'appCss',
- 'appTheme',
- 'hidePromotedAttributes',
- 'readOnly',
- 'autoReadOnlyDisabled',
- 'cssClass',
- 'iconClass',
- 'keyboardShortcut',
- 'run',
- 'runOnInstance',
- 'runAtHour',
- 'customRequestHandler',
- 'customResourceProvider',
- 'widget',
- 'noteInfoWidgetDisabled',
- 'linkMapWidgetDisabled',
- 'revisionsWidgetDisabled',
- 'whatLinksHereWidgetDisabled',
- 'similarNotesWidgetDisabled',
- 'workspace',
- 'workspaceIconClass',
- 'workspaceTabBackgroundColor',
- 'searchHome',
- 'workspaceInbox',
- 'workspaceSearchHome',
- 'sqlConsoleHome',
- 'datePattern',
- 'pageSize',
- 'viewType',
- 'mapRootNoteId',
- 'bookmarkFolder',
- 'sorted',
- 'top',
- 'fullContentWidth',
- 'shareHiddenFromTree',
- 'shareExternalLink',
- 'shareAlias',
- 'shareOmitDefaultCss',
- 'shareRoot',
- 'internalLink',
- 'imageLink',
- 'relationMapLink',
- 'includeMapLink',
- 'runOnNoteCreation',
- 'runOnNoteTitleChange',
- 'runOnNoteContentChange',
- 'runOnNoteChange',
- 'runOnChildNoteCreation',
- 'runOnAttributeCreation',
- 'runOnAttributeChange',
- 'template',
- 'inherit',
- 'widget',
- 'renderNote',
- 'shareCss',
- 'shareJs',
- 'shareTemplate',
- 'shareFavicon',
- 'executeButton',
- 'keepCurrentHoisting',
- 'color',
- 'toc',
- 'excludeFromNoteMap',
- 'docName',
- 'launcherType',
- 'builtinWidget',
- 'baseSize',
- 'growthFactor'
- );
-
- UPDATE attributes SET name = 'name'
- AND name NOT IN ('inbox',
- 'disableVersioning',
- 'calendarRoot',
- 'archived',
- 'excludeFromExport',
- 'disableInclusion',
- 'appCss',
- 'appTheme',
- 'hidePromotedAttributes',
- 'readOnly',
- 'autoReadOnlyDisabled',
- 'cssClass',
- 'iconClass',
- 'keyboardShortcut',
- 'run',
- 'runOnInstance',
- 'runAtHour',
- 'customRequestHandler',
- 'customResourceProvider',
- 'widget',
- 'noteInfoWidgetDisabled',
- 'linkMapWidgetDisabled',
- 'revisionsWidgetDisabled',
- 'whatLinksHereWidgetDisabled',
- 'similarNotesWidgetDisabled',
- 'workspace',
- 'workspaceIconClass',
- 'workspaceTabBackgroundColor',
- 'searchHome',
- 'workspaceInbox',
- 'workspaceSearchHome',
- 'sqlConsoleHome',
- 'datePattern',
- 'pageSize',
- 'viewType',
- 'mapRootNoteId',
- 'bookmarkFolder',
- 'sorted',
- 'top',
- 'fullContentWidth',
- 'shareHiddenFromTree',
- 'shareExternalLink',
- 'shareAlias',
- 'shareOmitDefaultCss',
- 'shareRoot',
- 'internalLink',
- 'imageLink',
- 'relationMapLink',
- 'includeMapLink',
- 'runOnNoteCreation',
- 'runOnNoteTitleChange',
- 'runOnNoteContentChange',
- 'runOnNoteChange',
- 'runOnChildNoteCreation',
- 'runOnAttributeCreation',
- 'runOnAttributeChange',
- 'template',
- 'inherit',
- 'widget',
- 'renderNote',
- 'shareCss',
- 'shareJs',
- 'shareTemplate',
- 'shareFavicon',
- 'executeButton',
- 'keepCurrentHoisting',
- 'color',
- 'toc',
- 'excludeFromNoteMap',
- 'docName',
- 'launcherType',
- 'builtinWidget',
- 'baseSize',
- 'growthFactor'
- );
-
+ UPDATE attributes SET name = 'name', value = 'value' WHERE type = 'label'
+ AND name NOT IN
+ ('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
+ 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
+ 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
+ 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
+ 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
+ 'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
+ 'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
+ 'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
- 'fullContentWidth', 'shareHiddenFromTree', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
++ 'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
+ 'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
+ 'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
+ 'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
+ 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation',
+ 'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
- 'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
++ 'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
+ UPDATE attributes SET name = 'name' WHERE type = 'relation'
+ AND name NOT IN
+ ('inbox', 'disableVersioning', 'calendarRoot', 'archived', 'excludeFromExport', 'disableInclusion', 'appCss',
+ 'appTheme', 'hidePromotedAttributes', 'readOnly', 'autoReadOnlyDisabled', 'cssClass', 'iconClass',
+ 'keyboardShortcut', 'run', 'runOnInstance', 'runAtHour', 'customRequestHandler', 'customResourceProvider',
+ 'widget', 'noteInfoWidgetDisabled', 'linkMapWidgetDisabled', 'revisionsWidgetDisabled',
+ 'whatLinksHereWidgetDisabled', 'similarNotesWidgetDisabled', 'workspace', 'workspaceIconClass',
+ 'workspaceTabBackgroundColor', 'workspaceCalendarRoot', 'workspaceTemplate', 'searchHome', 'workspaceInbox',
+ 'workspaceSearchHome', 'sqlConsoleHome', 'datePattern', 'pageSize', 'viewType', 'mapRootNoteId',
+ 'bookmarkFolder', 'sorted', 'sortDirection', 'sortFoldersFirst', 'sortNatural', 'sortLocale', 'top',
- 'fullContentWidth', 'shareHiddenFromTree', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
++ 'fullContentWidth', 'shareHiddenFromTree', 'shareExternalLink', 'shareOmitDefaultCss', 'shareRoot', 'shareDescription',
+ 'shareRaw', 'shareDisallowRobotIndexing', 'shareIndex', 'displayRelations', 'hideRelations', 'titleTemplate',
+ 'template', 'toc', 'color', 'keepCurrentHoisting', 'executeButton', 'executeDescription', 'newNotesOnTop',
+ 'clipperInbox', 'internalLink', 'imageLink', 'relationMapLink', 'includeMapLink', 'runOnNoteCreation',
+ 'runOnNoteTitleChange', 'runOnNoteChange', 'runOnNoteContentChange', 'runOnNoteDeletion', 'runOnBranchCreation',
+ 'runOnBranchDeletion', 'runOnChildNoteCreation', 'runOnAttributeCreation', 'runOnAttributeChange', 'template',
- 'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareFavicon');
++ 'inherit', 'widget', 'renderNote', 'shareCss', 'shareJs', 'shareTemplate', 'shareFavicon');
UPDATE branches SET prefix = 'prefix' WHERE prefix IS NOT NULL AND prefix != 'recovered';
UPDATE options SET value = 'anonymized' WHERE name IN
- ('documentId', 'documentSecret', 'encryptedDataKey',
- 'passwordVerificationHash', 'passwordVerificationSalt',
- 'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
- AND value != '';
+ ('documentId', 'documentSecret', 'encryptedDataKey',
+ 'passwordVerificationHash', 'passwordVerificationSalt',
+ 'passwordDerivedKeySalt', 'username', 'syncServerHost', 'syncProxy')
+ AND value != '';
VACUUM;