mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	move share root to hidden subtree
This commit is contained in:
		
							
								
								
									
										1
									
								
								db/migrations/0199_move_share_under_hidden.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								db/migrations/0199_move_share_under_hidden.sql
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | UPDATE branches SET parentNoteId = 'hidden' WHERE branchId = 'share'; | ||||||
| @@ -4,7 +4,7 @@ const build = require('./build'); | |||||||
| const packageJson = require('../../package'); | const packageJson = require('../../package'); | ||||||
| const {TRILIUM_DATA_DIR} = require('./data_dir'); | const {TRILIUM_DATA_DIR} = require('./data_dir'); | ||||||
|  |  | ||||||
| const APP_DB_VERSION = 198; | const APP_DB_VERSION = 199; | ||||||
| const SYNC_VERSION = 27; | const SYNC_VERSION = 27; | ||||||
| const CLIPPER_PROTOCOL_VERSION = "1.0"; | const CLIPPER_PROTOCOL_VERSION = "1.0"; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -206,13 +206,15 @@ function getShareRoot() { | |||||||
|     let shareRoot = becca.getNote('share'); |     let shareRoot = becca.getNote('share'); | ||||||
|  |  | ||||||
|     if (!shareRoot) { |     if (!shareRoot) { | ||||||
|  |         const hiddenRoot = getHiddenRoot(); | ||||||
|  |  | ||||||
|         shareRoot = noteService.createNewNote({ |         shareRoot = noteService.createNewNote({ | ||||||
|             branchId: 'share', |             branchId: 'share', | ||||||
|             noteId: 'share', |             noteId: 'share', | ||||||
|             title: 'Shared notes', |             title: 'Shared notes', | ||||||
|             type: 'text', |             type: 'text', | ||||||
|             content: '', |             content: '', | ||||||
|             parentNoteId: 'root' |             parentNoteId: hiddenRoot.noteId | ||||||
|         }).note; |         }).note; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user