mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	Compare commits
	
		
			581 Commits
		
	
	
		
			v0.46.2-be
			...
			v0.48.2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					3d98644bf6 | ||
| 
						 | 
					a22e4d60b6 | ||
| 
						 | 
					069fbee3a6 | ||
| 
						 | 
					8b21867c5c | ||
| 
						 | 
					2cc4367b37 | ||
| 
						 | 
					241d1b1035 | ||
| 
						 | 
					449081807e | ||
| 
						 | 
					dc0d6d24bd | ||
| 
						 | 
					4111a2f0e8 | ||
| 
						 | 
					8ef4b2bf50 | ||
| 
						 | 
					53875d26bc | ||
| 
						 | 
					f505f9d65a | ||
| 
						 | 
					6434889cd6 | ||
| 
						 | 
					21d2ca3c54 | ||
| 
						 | 
					64a3a8b561 | ||
| 
						 | 
					6738f2cd24 | ||
| 
						 | 
					1cdd644b8f | ||
| 
						 | 
					f5dc05e79a | ||
| 
						 | 
					e2c37a6f8c | ||
| 
						 | 
					cfea2440fb | ||
| 
						 | 
					23e34e8c02 | ||
| 
						 | 
					8bd7b657f8 | ||
| 
						 | 
					899d9e65fd | ||
| 
						 | 
					ec732c0a98 | ||
| 
						 | 
					66797f34c4 | ||
| 
						 | 
					1ad25b063d | ||
| 
						 | 
					e09b2902fa | ||
| 
						 | 
					f6776df645 | ||
| 
						 | 
					f0c672445d | ||
| 
						 | 
					a033ddfcb7 | ||
| 
						 | 
					d02d846024 | ||
| 
						 | 
					a8b6538c4e | ||
| 
						 | 
					4eb4a44331 | ||
| 
						 | 
					c1e1f3df24 | ||
| 
						 | 
					11e9f8403e | ||
| 
						 | 
					ba676587df | ||
| 
						 | 
					20696aa0ab | ||
| 
						 | 
					a08690b123 | ||
| 
						 | 
					79f54b4e97 | ||
| 
						 | 
					973fe52275 | ||
| 
						 | 
					5938e033d4 | ||
| 
						 | 
					eecba725b0 | ||
| 
						 | 
					fa40a5f496 | ||
| 
						 | 
					abbba6501d | ||
| 
						 | 
					824f5dbaac | ||
| 
						 | 
					24a45b03f5 | ||
| 
						 | 
					e10e18e63a | ||
| 
						 | 
					7152c5e51d | ||
| 
						 | 
					711af02928 | ||
| 
						 | 
					df8706026e | ||
| 
						 | 
					17fe9a6a1b | ||
| 
						 | 
					2d08eb7366 | ||
| 
						 | 
					8d42ffca6d | ||
| 
						 | 
					0654dc855f | ||
| 
						 | 
					0571f02830 | ||
| 
						 | 
					b2b1c9ebb7 | ||
| 
						 | 
					1f75b9c92f | ||
| 
						 | 
					e2c4f32b5e | ||
| 
						 | 
					18ffcf7880 | ||
| 
						 | 
					6ae8508413 | ||
| 
						 | 
					ec3b844026 | ||
| 
						 | 
					a1ca538106 | ||
| 
						 | 
					75fc9e2048 | ||
| 
						 | 
					a1c1c7c830 | ||
| 
						 | 
					e4a483aefe | ||
| 
						 | 
					8c2a5d19f2 | ||
| 
						 | 
					2c450fc72d | ||
| 
						 | 
					831de3ffed | ||
| 
						 | 
					291b434d70 | ||
| 
						 | 
					a68fd5ab83 | ||
| 
						 | 
					8a8bdaf80e | ||
| 
						 | 
					26b89fc801 | ||
| 
						 | 
					af3fd61974 | ||
| 
						 | 
					f4dde84f06 | ||
| 
						 | 
					bc920dc5dc | ||
| 
						 | 
					896c9cec04 | ||
| 
						 | 
					b37bcd294c | ||
| 
						 | 
					14f24c646a | ||
| 
						 | 
					fea46bb150 | ||
| 
						 | 
					37c30bf88a | ||
| 
						 | 
					d975acc99a | ||
| 
						 | 
					c2d35dac4d | ||
| 
						 | 
					5358b58191 | ||
| 
						 | 
					0264e847ef | ||
| 
						 | 
					c5917bfc78 | ||
| 
						 | 
					533fcd06e4 | ||
| 
						 | 
					192a2fe9f9 | ||
| 
						 | 
					e6bc8ed3b5 | ||
| 
						 | 
					8ff563ba40 | ||
| 
						 | 
					d5bd9875f9 | ||
| 
						 | 
					113bebed3b | ||
| 
						 | 
					2fcb0c05c0 | ||
| 
						 | 
					fdb7b7721d | ||
| 
						 | 
					3d9260c974 | ||
| 
						 | 
					8769fd71cb | ||
| 
						 | 
					a2baa9bdb3 | ||
| 
						 | 
					88714cce94 | ||
| 
						 | 
					bc1d438075 | ||
| 
						 | 
					fd00f6bd97 | ||
| 
						 | 
					b041d081db | ||
| 
						 | 
					fabf24a065 | ||
| 
						 | 
					e3fc0968ba | ||
| 
						 | 
					a766374bf4 | ||
| 
						 | 
					0f693dae5e | ||
| 
						 | 
					208492bee1 | ||
| 
						 | 
					b0d767df69 | ||
| 
						 | 
					476b8250c9 | ||
| 
						 | 
					e4ba7d65e8 | ||
| 
						 | 
					9c9a3fc030 | ||
| 
						 | 
					b85cf07a28 | ||
| 
						 | 
					bdde52f004 | ||
| 
						 | 
					dd37f09309 | ||
| 
						 | 
					a0caa21458 | ||
| 
						 | 
					43e829ca99 | ||
| 
						 | 
					ed26e32ccb | ||
| 
						 | 
					5866004e23 | ||
| 
						 | 
					06bcfe1aee | ||
| 
						 | 
					2d82da32d4 | ||
| 
						 | 
					2b017a956e | ||
| 
						 | 
					0448883782 | ||
| 
						 | 
					9b9be5d155 | ||
| 
						 | 
					3f2ee4aefd | ||
| 
						 | 
					b90ae8eb79 | ||
| 
						 | 
					266807179c | ||
| 
						 | 
					4023c28f5e | ||
| 
						 | 
					010f075ac5 | ||
| 
						 | 
					151687cd9b | ||
| 
						 | 
					f24ea8137b | ||
| 
						 | 
					b8d8e01908 | ||
| 
						 | 
					79d492d0f0 | ||
| 
						 | 
					f0af26a57b | ||
| 
						 | 
					2b8c6e3dd0 | ||
| 
						 | 
					061f8acf11 | ||
| 
						 | 
					5cfd1c030d | ||
| 
						 | 
					6e300c7cf5 | ||
| 
						 | 
					167d4816fd | ||
| 
						 | 
					3e5db71652 | ||
| 
						 | 
					1bc50ed976 | ||
| 
						 | 
					08c638c2fa | ||
| 
						 | 
					5f22864a93 | ||
| 
						 | 
					cfcc34fa8e | ||
| 
						 | 
					635f5fdc5b | ||
| 
						 | 
					d0747b125c | ||
| 
						 | 
					66374bf95f | ||
| 
						 | 
					d27fcaf317 | ||
| 
						 | 
					0ee093f038 | ||
| 
						 | 
					06eb0ce910 | ||
| 
						 | 
					c59b3a0c5c | ||
| 
						 | 
					08eda83700 | ||
| 
						 | 
					d23bb5fd17 | ||
| 
						 | 
					8cb07525cf | ||
| 
						 | 
					dc4c922edb | ||
| 
						 | 
					c3ed673453 | ||
| 
						 | 
					3fd16a16e8 | ||
| 
						 | 
					3448eba7b9 | ||
| 
						 | 
					ad8f374276 | ||
| 
						 | 
					19a6d89d4f | ||
| 
						 | 
					b99d83af50 | ||
| 
						 | 
					e050e380b9 | ||
| 
						 | 
					68d599ed19 | ||
| 
						 | 
					9d9bc31d91 | ||
| 
						 | 
					b619a6515b | ||
| 
						 | 
					13a16e8251 | ||
| 
						 | 
					86a53ceebb | ||
| 
						 | 
					669eaa7509 | ||
| 
						 | 
					f50084dc1b | ||
| 
						 | 
					3a78a75afc | ||
| 
						 | 
					6e7b722bf2 | ||
| 
						 | 
					4ca0f4b06b | ||
| 
						 | 
					a33661d050 | ||
| 
						 | 
					f1338bb643 | ||
| 
						 | 
					b6b6d11ef7 | ||
| 
						 | 
					17a6c94f66 | ||
| 
						 | 
					e74979ccc1 | ||
| 
						 | 
					e003341dff | ||
| 
						 | 
					5c4369206a | ||
| 
						 | 
					507a0e2e1d | ||
| 
						 | 
					b381331029 | ||
| 
						 | 
					af703445e1 | ||
| 
						 | 
					c508217604 | ||
| 
						 | 
					6a1287a3de | ||
| 
						 | 
					7261ab69bc | ||
| 
						 | 
					f9cfd134b7 | ||
| 
						 | 
					89d28ef27c | ||
| 
						 | 
					9da8d466b8 | ||
| 
						 | 
					74d0626dc9 | ||
| 
						 | 
					830a357b9a | ||
| 
						 | 
					7b129c7c34 | ||
| 
						 | 
					adc98d4515 | ||
| 
						 | 
					f3959cf2aa | ||
| 
						 | 
					6fdabbc73b | ||
| 
						 | 
					de6ff09bb9 | ||
| 
						 | 
					c82308489b | ||
| 
						 | 
					98ee3b029a | ||
| 
						 | 
					a6bef45a30 | ||
| 
						 | 
					05d077ce28 | ||
| 
						 | 
					9adf4d7e8e | ||
| 
						 | 
					e2819109e9 | ||
| 
						 | 
					3c8e267aad | ||
| 
						 | 
					da0670188b | ||
| 
						 | 
					65938c5272 | ||
| 
						 | 
					7ea72632b8 | ||
| 
						 | 
					9ca225b40f | ||
| 
						 | 
					b68bdc5005 | ||
| 
						 | 
					9e77a424a4 | ||
| 
						 | 
					e25b965cb3 | ||
| 
						 | 
					8d3a3d4873 | ||
| 
						 | 
					c115628f1f | ||
| 
						 | 
					703fbd30df | ||
| 
						 | 
					5011b6a51a | ||
| 
						 | 
					4cc02ffb31 | ||
| 
						 | 
					1e767482b4 | ||
| 
						 | 
					2035304b63 | ||
| 
						 | 
					5be7f003ca | ||
| 
						 | 
					b660238a40 | ||
| 
						 | 
					b9ff481eb7 | ||
| 
						 | 
					eebbf74517 | ||
| 
						 | 
					61e78858bc | ||
| 
						 | 
					0351d7eff1 | ||
| 
						 | 
					9e1c9782ff | ||
| 
						 | 
					b2148f4a18 | ||
| 
						 | 
					16cc84be99 | ||
| 
						 | 
					0265c190db | ||
| 
						 | 
					32c88219c3 | ||
| 
						 | 
					962d5a5674 | ||
| 
						 | 
					995e6c2fef | ||
| 
						 | 
					0a2807c0b3 | ||
| 
						 | 
					1b9c3b0759 | ||
| 
						 | 
					f1a36f6cea | ||
| 
						 | 
					d9ec8bba80 | ||
| 
						 | 
					02da5b598c | ||
| 
						 | 
					2220c4491b | ||
| 
						 | 
					fb31acc8e0 | ||
| 
						 | 
					92cf2c18fa | ||
| 
						 | 
					c5182b8757 | ||
| 
						 | 
					e054a1694e | ||
| 
						 | 
					3a7da1d561 | ||
| 
						 | 
					3893f663d0 | ||
| 
						 | 
					a0de3c97a5 | ||
| 
						 | 
					c886583396 | ||
| 
						 | 
					e48609aa68 | ||
| 
						 | 
					882912826f | ||
| 
						 | 
					6d51593b7d | ||
| 
						 | 
					faab6be48d | ||
| 
						 | 
					8debf18984 | ||
| 
						 | 
					4bf1c25721 | ||
| 
						 | 
					a1d7737551 | ||
| 
						 | 
					2bfd7b844c | ||
| 
						 | 
					ac04be4433 | ||
| 
						 | 
					5e5df72020 | ||
| 
						 | 
					f1344e3b95 | ||
| 
						 | 
					9216e430db | ||
| 
						 | 
					855b876d50 | ||
| 
						 | 
					c04bbd4973 | ||
| 
						 | 
					1a615398aa | ||
| 
						 | 
					b557a44f34 | ||
| 
						 | 
					f50bb2278c | ||
| 
						 | 
					6b68068cde | ||
| 
						 | 
					7ed816f1b2 | ||
| 
						 | 
					f8dd8ebf1a | ||
| 
						 | 
					4c64bd852e | ||
| 
						 | 
					af62b07d5b | ||
| 
						 | 
					4338f65e01 | ||
| 
						 | 
					9a147365f5 | ||
| 
						 | 
					e48bbe5b19 | ||
| 
						 | 
					bdff1c1246 | ||
| 
						 | 
					d4a955a3f5 | ||
| 
						 | 
					07e214c564 | ||
| 
						 | 
					b351157a6a | ||
| 
						 | 
					56378cd0f5 | ||
| 
						 | 
					a76e3f6e2d | ||
| 
						 | 
					f5573fcad4 | ||
| 
						 | 
					60f88574b0 | ||
| 
						 | 
					65c3bcb565 | ||
| 
						 | 
					ef4bc13dd1 | ||
| 
						 | 
					aa901b67ed | ||
| 
						 | 
					7a389baf08 | ||
| 
						 | 
					57b6271c0b | ||
| 
						 | 
					9532a5662f | ||
| 
						 | 
					520db931ae | ||
| 
						 | 
					5e19a37df7 | ||
| 
						 | 
					4b6b8b1678 | ||
| 
						 | 
					a3d44fbdef | ||
| 
						 | 
					7fcf90437a | ||
| 
						 | 
					614b1bdbaf | ||
| 
						 | 
					4d213300ac | ||
| 
						 | 
					b7ca3dec54 | ||
| 
						 | 
					c4987c4fd1 | ||
| 
						 | 
					f176191efb | ||
| 
						 | 
					dc5304faa0 | ||
| 
						 | 
					205f9953f9 | ||
| 
						 | 
					58d61800f3 | ||
| 
						 | 
					b9639bffce | ||
| 
						 | 
					3c7232f427 | ||
| 
						 | 
					5707b7e29a | ||
| 
						 | 
					2f5d3729de | ||
| 
						 | 
					bae8551652 | ||
| 
						 | 
					1f5e4530c3 | ||
| 
						 | 
					7d94202460 | ||
| 
						 | 
					30cc566518 | ||
| 
						 | 
					85933771f8 | ||
| 
						 | 
					e924662a29 | ||
| 
						 | 
					2985100801 | ||
| 
						 | 
					d68ea201a3 | ||
| 
						 | 
					7528181ca2 | ||
| 
						 | 
					1302765478 | ||
| 
						 | 
					5b220adc31 | ||
| 
						 | 
					98dfc77195 | ||
| 
						 | 
					1a0aaf4a30 | ||
| 
						 | 
					79a85a0aa7 | ||
| 
						 | 
					274cf7312c | ||
| 
						 | 
					29e4e2afbb | ||
| 
						 | 
					39f0f26f28 | ||
| 
						 | 
					1a13132a69 | ||
| 
						 | 
					a3847842cb | ||
| 
						 | 
					b7bd5396d1 | ||
| 
						 | 
					8c1c9b00e2 | ||
| 
						 | 
					845f5d15c4 | ||
| 
						 | 
					d18b95d87c | ||
| 
						 | 
					731051154b | ||
| 
						 | 
					a093508fbe | ||
| 
						 | 
					5860b2eebb | ||
| 
						 | 
					a4aaa49774 | ||
| 
						 | 
					a4c7069856 | ||
| 
						 | 
					7cad65b370 | ||
| 
						 | 
					3ead734323 | ||
| 
						 | 
					2451596e8c | ||
| 
						 | 
					a5d702b143 | ||
| 
						 | 
					439ef4a8cb | ||
| 
						 | 
					8bd3e17a3b | ||
| 
						 | 
					7a7c890946 | ||
| 
						 | 
					cb8e551ee0 | ||
| 
						 | 
					04f249e800 | ||
| 
						 | 
					a65eda5e4a | ||
| 
						 | 
					9645a07f2f | ||
| 
						 | 
					f6dd1110e8 | ||
| 
						 | 
					623200b92b | ||
| 
						 | 
					4ff40ba14f | ||
| 
						 | 
					16563eaba4 | ||
| 
						 | 
					caa6e9ee72 | ||
| 
						 | 
					f4a58a2598 | ||
| 
						 | 
					cecce1df20 | ||
| 
						 | 
					2030c8e995 | ||
| 
						 | 
					8a9bd4deb4 | ||
| 
						 | 
					8417d4a4ea | ||
| 
						 | 
					5d58520949 | ||
| 
						 | 
					d8d15b528e | ||
| 
						 | 
					1d008cad13 | ||
| 
						 | 
					ef0941479c | ||
| 
						 | 
					9afea492db | ||
| 
						 | 
					84246fd197 | ||
| 
						 | 
					9441cb177f | ||
| 
						 | 
					bcfe097dd6 | ||
| 
						 | 
					a410ed1b74 | ||
| 
						 | 
					2edc7dbf58 | ||
| 
						 | 
					051b9dff21 | ||
| 
						 | 
					de6108f95d | ||
| 
						 | 
					fddab59265 | ||
| 
						 | 
					1308dc20e8 | ||
| 
						 | 
					e257634ccf | ||
| 
						 | 
					3091119893 | ||
| 
						 | 
					c035627f0a | ||
| 
						 | 
					273d4e0052 | ||
| 
						 | 
					77eac8f764 | ||
| 
						 | 
					1af10d48a2 | ||
| 
						 | 
					d13c8771ca | ||
| 
						 | 
					6626f100ad | ||
| 
						 | 
					ccadff5015 | ||
| 
						 | 
					e41be520a8 | ||
| 
						 | 
					43eb248450 | ||
| 
						 | 
					f22c76d9fb | ||
| 
						 | 
					b1131844d6 | ||
| 
						 | 
					03f3e46f8b | ||
| 
						 | 
					6f1b0b92fe | ||
| 
						 | 
					219098ab53 | ||
| 
						 | 
					e466c393eb | ||
| 
						 | 
					d8f1c39282 | ||
| 
						 | 
					cb3a5bba61 | ||
| 
						 | 
					5e40c03fc9 | ||
| 
						 | 
					3b1fb8024f | ||
| 
						 | 
					93cae44ba0 | ||
| 
						 | 
					a5ee590544 | ||
| 
						 | 
					6c5b1420d2 | ||
| 
						 | 
					8d8d654fe8 | ||
| 
						 | 
					7494491560 | ||
| 
						 | 
					6f49f870ed | ||
| 
						 | 
					b9133cb683 | ||
| 
						 | 
					ccac46527c | ||
| 
						 | 
					dcd35b1ea2 | ||
| 
						 | 
					a74741343e | ||
| 
						 | 
					4ff7e0813d | ||
| 
						 | 
					6d2d72fa7f | ||
| 
						 | 
					30ec706d37 | ||
| 
						 | 
					25ce2e4253 | ||
| 
						 | 
					b5674223e5 | ||
| 
						 | 
					02988ed2b3 | ||
| 
						 | 
					c27f573eed | ||
| 
						 | 
					c5b0c60797 | ||
| 
						 | 
					025af8df02 | ||
| 
						 | 
					d9e8cff00f | ||
| 
						 | 
					1a4f35470c | ||
| 
						 | 
					1d99c4e80b | ||
| 
						 | 
					dc7c64a94d | ||
| 
						 | 
					dc6a530d8c | ||
| 
						 | 
					38b0d05c20 | ||
| 
						 | 
					6e010dfbd7 | ||
| 
						 | 
					172bdb6118 | ||
| 
						 | 
					6136243d61 | ||
| 
						 | 
					a88a32acae | ||
| 
						 | 
					583df35231 | ||
| 
						 | 
					634baae796 | ||
| 
						 | 
					a674a12706 | ||
| 
						 | 
					c29f1af48f | ||
| 
						 | 
					51d1d8efb8 | ||
| 
						 | 
					a8d72c46e4 | ||
| 
						 | 
					ec36fbd83e | ||
| 
						 | 
					aedb05cbab | ||
| 
						 | 
					bb16840a72 | ||
| 
						 | 
					7b5d44a329 | ||
| 
						 | 
					d3cccae2df | ||
| 
						 | 
					9ba514d930 | ||
| 
						 | 
					79bb249f3b | ||
| 
						 | 
					1fdf889ccf | ||
| 
						 | 
					42510fda5c | ||
| 
						 | 
					f7e86c5be0 | ||
| 
						 | 
					af5b1021c7 | ||
| 
						 | 
					8e1b8ab26c | ||
| 
						 | 
					4311834d75 | ||
| 
						 | 
					197537b159 | ||
| 
						 | 
					917b259e92 | ||
| 
						 | 
					a53a65be1f | ||
| 
						 | 
					44aa2834b3 | ||
| 
						 | 
					58e4bd4974 | ||
| 
						 | 
					44af431a93 | ||
| 
						 | 
					479d742e85 | ||
| 
						 | 
					3337487063 | ||
| 
						 | 
					beb42f18fe | ||
| 
						 | 
					00a27313fb | ||
| 
						 | 
					564fea43a9 | ||
| 
						 | 
					3d3142e20c | ||
| 
						 | 
					9c679aef20 | ||
| 
						 | 
					d47a55d23a | ||
| 
						 | 
					052f584bf4 | ||
| 
						 | 
					1dfebdf6db | ||
| 
						 | 
					5314446980 | ||
| 
						 | 
					6b41c26d2b | ||
| 
						 | 
					463071ea4d | ||
| 
						 | 
					79c5645964 | ||
| 
						 | 
					2f58b6b3c8 | ||
| 
						 | 
					e7909d25c6 | ||
| 
						 | 
					f739dbfe87 | ||
| 
						 | 
					c43b20ec2b | ||
| 
						 | 
					2d0cb5b66e | ||
| 
						 | 
					caf38c94c7 | ||
| 
						 | 
					51db6761c8 | ||
| 
						 | 
					4d110aa143 | ||
| 
						 | 
					9c436cb61f | ||
| 
						 | 
					caa11b8f7e | ||
| 
						 | 
					926e9e12c0 | ||
| 
						 | 
					c4d35fb44e | ||
| 
						 | 
					1b41b92e02 | ||
| 
						 | 
					41cce4dcb9 | ||
| 
						 | 
					858072cc10 | ||
| 
						 | 
					855c5e0e67 | ||
| 
						 | 
					903e6b7ccc | ||
| 
						 | 
					c71f3c35b8 | ||
| 
						 | 
					f0cc3d0bcd | ||
| 
						 | 
					7672f22ce0 | ||
| 
						 | 
					ef37a52a06 | ||
| 
						 | 
					2318d615bb | ||
| 
						 | 
					2e82b7380b | ||
| 
						 | 
					bc14c3d665 | ||
| 
						 | 
					b89ea9a684 | ||
| 
						 | 
					6c9ac5b5ec | ||
| 
						 | 
					9cd45299b1 | ||
| 
						 | 
					f1f4f45c9d | ||
| 
						 | 
					8644c38abc | ||
| 
						 | 
					e569ae1a0d | ||
| 
						 | 
					da741b522e | ||
| 
						 | 
					e055d4e15e | ||
| 
						 | 
					58200d6431 | ||
| 
						 | 
					57db945558 | ||
| 
						 | 
					2e6cd5f809 | ||
| 
						 | 
					6541523e88 | ||
| 
						 | 
					f60b282e09 | ||
| 
						 | 
					744ed27d91 | ||
| 
						 | 
					a254199746 | ||
| 
						 | 
					496767a52b | ||
| 
						 | 
					9139c597e5 | ||
| 
						 | 
					942132c01d | ||
| 
						 | 
					928c8bfdf7 | ||
| 
						 | 
					1862acd1ff | ||
| 
						 | 
					ce7e18d0b0 | ||
| 
						 | 
					65280d5ba3 | ||
| 
						 | 
					7e3d424e23 | ||
| 
						 | 
					d5f38c0f88 | ||
| 
						 | 
					56f97f1081 | ||
| 
						 | 
					e648505ad3 | ||
| 
						 | 
					71c3fd5cbb | ||
| 
						 | 
					f9b0418333 | ||
| 
						 | 
					392a00ac17 | ||
| 
						 | 
					1a9919a866 | ||
| 
						 | 
					9dd95b62a9 | ||
| 
						 | 
					135b4fe88e | ||
| 
						 | 
					bff04c121a | ||
| 
						 | 
					b79d81a94d | ||
| 
						 | 
					7e2186721f | ||
| 
						 | 
					6a70e0ab97 | ||
| 
						 | 
					b38a63d336 | ||
| 
						 | 
					d62558d97a | ||
| 
						 | 
					76aa7d1451 | ||
| 
						 | 
					4f401d71a2 | ||
| 
						 | 
					eb437ff642 | ||
| 
						 | 
					6edc6e2825 | ||
| 
						 | 
					e8903e82a1 | ||
| 
						 | 
					59e8cb8c8b | ||
| 
						 | 
					0cfd95d9b8 | ||
| 
						 | 
					1aa5349628 | ||
| 
						 | 
					a4bffbfa60 | ||
| 
						 | 
					70656d240b | ||
| 
						 | 
					42067b3c1e | ||
| 
						 | 
					0bc91da0bb | ||
| 
						 | 
					4e21d12202 | ||
| 
						 | 
					fdce218e88 | ||
| 
						 | 
					5b72b577b8 | ||
| 
						 | 
					ec2f8ec796 | ||
| 
						 | 
					cd3f8a41af | ||
| 
						 | 
					aa8bf0e60a | ||
| 
						 | 
					5b3a6b5e9d | ||
| 
						 | 
					6c8d20288d | ||
| 
						 | 
					88d04772c4 | ||
| 
						 | 
					9fd26a9b9f | ||
| 
						 | 
					98f02c3c9a | ||
| 
						 | 
					584fea1992 | ||
| 
						 | 
					af50a1ec52 | ||
| 
						 | 
					4e76d1fa85 | ||
| 
						 | 
					81e226af6f | ||
| 
						 | 
					03a11e6f77 | ||
| 
						 | 
					cb558e1378 | ||
| 
						 | 
					e1a16b4a9f | ||
| 
						 | 
					12b468d3dc | ||
| 
						 | 
					6f901e6852 | ||
| 
						 | 
					09e9ac4d00 | ||
| 
						 | 
					723a0e479e | ||
| 
						 | 
					5b8e876b77 | ||
| 
						 | 
					a33ac65fdf | ||
| 
						 | 
					f8fb071a6f | ||
| 
						 | 
					a654078e56 | ||
| 
						 | 
					fba68681aa | ||
| 
						 | 
					50c84e0f5f | ||
| 
						 | 
					f27370d44f | ||
| 
						 | 
					c6c9202c00 | ||
| 
						 | 
					2cafda5f66 | ||
| 
						 | 
					873953cbaf | ||
| 
						 | 
					d51744ce19 | ||
| 
						 | 
					7df8c940b6 | ||
| 
						 | 
					9bac2a4819 | ||
| 
						 | 
					88147f7a0a | ||
| 
						 | 
					ca77211b38 | ||
| 
						 | 
					4606e8d118 | ||
| 
						 | 
					9f002fa802 | ||
| 
						 | 
					060d4fc27b | ||
| 
						 | 
					bf0fbe201e | ||
| 
						 | 
					721e5da672 | ||
| 
						 | 
					8192b51b8a | ||
| 
						 | 
					73514a63d8 | ||
| 
						 | 
					f8c310eb8f | ||
| 
						 | 
					b9422b0efd | ||
| 
						 | 
					14ced949a9 | ||
| 
						 | 
					5b5c2a2dbb | ||
| 
						 | 
					2c958eaacb | ||
| 
						 | 
					4aa27b6033 | ||
| 
						 | 
					89a0c5a1c9 | ||
| 
						 | 
					78e48095e6 | ||
| 
						 | 
					02016ed031 | ||
| 
						 | 
					cb91dadeca | ||
| 
						 | 
					2c755bcc38 | ||
| 
						 | 
					3c7a6bc1e4 | ||
| 
						 | 
					3fe87259e2 | ||
| 
						 | 
					d476dfc53b | ||
| 
						 | 
					1c59bc4d3c | 
							
								
								
									
										1
									
								
								.github/FUNDING.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/FUNDING.yml
									
									
									
									
										vendored
									
									
								
							@@ -1,3 +1,4 @@
 | 
				
			|||||||
# These are supported funding model platforms
 | 
					# These are supported funding model platforms
 | 
				
			||||||
 | 
					
 | 
				
			||||||
github: [zadam]
 | 
					github: [zadam]
 | 
				
			||||||
 | 
					custom: ["https://paypal.me/za4am"]
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										63
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								.github/ISSUE_TEMPLATE/bug_report.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,63 @@
 | 
				
			|||||||
 | 
					name: Bug Report
 | 
				
			||||||
 | 
					description: Report a bug
 | 
				
			||||||
 | 
					title: "(Bug report) "
 | 
				
			||||||
 | 
					labels: "Type: Bug"
 | 
				
			||||||
 | 
					body:
 | 
				
			||||||
 | 
					- type: checkboxes
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Preflight Checklist
 | 
				
			||||||
 | 
					    description: Please ensure you've completed all of the following.
 | 
				
			||||||
 | 
					    options:
 | 
				
			||||||
 | 
					      - label: I have searched the [issue tracker](https://www.github.com/zadam/trilium/issues) for a bug report that matches the one I want to file, without success.
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					- type: input
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Trilium Version
 | 
				
			||||||
 | 
					    description: What version of Trilium are you using?
 | 
				
			||||||
 | 
					    placeholder: 0.48.0-beta
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: dropdown
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: What operating system are you using?
 | 
				
			||||||
 | 
					    options:
 | 
				
			||||||
 | 
					      - Windows
 | 
				
			||||||
 | 
					      - macOS
 | 
				
			||||||
 | 
					      - Ubuntu
 | 
				
			||||||
 | 
					      - Other Linux
 | 
				
			||||||
 | 
					      - Other (specify below)
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: dropdown
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: What is your setup? 
 | 
				
			||||||
 | 
					    description: https://github.com/zadam/trilium/wiki#choose-the-setup
 | 
				
			||||||
 | 
					    options:
 | 
				
			||||||
 | 
					      - Local (no sync)
 | 
				
			||||||
 | 
					      - Local + server sync
 | 
				
			||||||
 | 
					      - Server access only
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: input
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Operating System Version
 | 
				
			||||||
 | 
					    description: What operating system version are you using? On Windows, click Start button > Settings > System > About. On macOS, click the Apple Menu > About This Mac. On Linux, use lsb_release or uname -a.
 | 
				
			||||||
 | 
					    placeholder: "e.g. Windows 10 version 1909, macOS Catalina 10.15.7, or Ubuntu 20.04"
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: textarea
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Expected Behavior
 | 
				
			||||||
 | 
					    description: A clear and concise description of what you expected to happen.
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: textarea
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Actual Behavior
 | 
				
			||||||
 | 
					    description: A clear description of what actually happens.
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: textarea
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Additional Information
 | 
				
			||||||
 | 
					    description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
 | 
				
			||||||
							
								
								
									
										22
									
								
								.github/ISSUE_TEMPLATE/feature_request.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.github/ISSUE_TEMPLATE/feature_request.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					name: Feature Request
 | 
				
			||||||
 | 
					description: Report a bug
 | 
				
			||||||
 | 
					title: "(Feature request) "
 | 
				
			||||||
 | 
					labels: "Type: Enhancement"
 | 
				
			||||||
 | 
					body:
 | 
				
			||||||
 | 
					- type: checkboxes
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Preflight Checklist
 | 
				
			||||||
 | 
					    description: Please ensure you've completed all of the following.
 | 
				
			||||||
 | 
					    options:
 | 
				
			||||||
 | 
					      - label: I have searched the [issue tracker](https://www.github.com/zadam/trilium/issues) for a feature request that matches the one I want to file, without success.
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					- type: textarea
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Describe feature
 | 
				
			||||||
 | 
					    description: A clear and concise description of what you want to be added..
 | 
				
			||||||
 | 
					  validations:
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
 | 
					- type: textarea
 | 
				
			||||||
 | 
					  attributes:
 | 
				
			||||||
 | 
					    label: Additional Information
 | 
				
			||||||
 | 
					    description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
 | 
				
			||||||
							
								
								
									
										71
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								.github/workflows/codeql-analysis.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,71 @@
 | 
				
			|||||||
 | 
					# For most projects, this workflow file will not need changing; you simply need
 | 
				
			||||||
 | 
					# to commit it to your repository.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# You may wish to alter this file to override the set of languages analyzed,
 | 
				
			||||||
 | 
					# or to provide custom queries or build logic.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# ******** NOTE ********
 | 
				
			||||||
 | 
					# We have attempted to detect the languages in your repository. Please check
 | 
				
			||||||
 | 
					# the `language` matrix defined below to confirm you have the correct set of
 | 
				
			||||||
 | 
					# supported CodeQL languages.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					name: "CodeQL"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: [ master ]
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    # The branches below must be a subset of the branches above
 | 
				
			||||||
 | 
					    branches: [ master ]
 | 
				
			||||||
 | 
					  schedule:
 | 
				
			||||||
 | 
					    - cron: '37 4 * * 1'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  analyze:
 | 
				
			||||||
 | 
					    name: Analyze
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      actions: read
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
 | 
					      security-events: write
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    strategy:
 | 
				
			||||||
 | 
					      fail-fast: false
 | 
				
			||||||
 | 
					      matrix:
 | 
				
			||||||
 | 
					        language: [ 'javascript' ]
 | 
				
			||||||
 | 
					        # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
 | 
				
			||||||
 | 
					        # Learn more:
 | 
				
			||||||
 | 
					        # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - name: Checkout repository
 | 
				
			||||||
 | 
					      uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Initializes the CodeQL tools for scanning.
 | 
				
			||||||
 | 
					    - name: Initialize CodeQL
 | 
				
			||||||
 | 
					      uses: github/codeql-action/init@v1
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        languages: ${{ matrix.language }}
 | 
				
			||||||
 | 
					        # If you wish to specify custom queries, you can do so here or in a config file.
 | 
				
			||||||
 | 
					        # By default, queries listed here will override any specified in a config file.
 | 
				
			||||||
 | 
					        # Prefix the list here with "+" to use these queries and those in the config file.
 | 
				
			||||||
 | 
					        # queries: ./path/to/local/query, your-org/your-repo/queries@main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
 | 
				
			||||||
 | 
					    # If this step fails, then you should remove it and run the build manually (see below)
 | 
				
			||||||
 | 
					    - name: Autobuild
 | 
				
			||||||
 | 
					      uses: github/codeql-action/autobuild@v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # ℹ️ Command-line programs to run using the OS shell.
 | 
				
			||||||
 | 
					    # 📚 https://git.io/JvXDl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
 | 
				
			||||||
 | 
					    #    and modify them (or add more) to build your code if your project
 | 
				
			||||||
 | 
					    #    uses a compiled language
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    #- run: |
 | 
				
			||||||
 | 
					    #   make bootstrap
 | 
				
			||||||
 | 
					    #   make release
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Perform CodeQL Analysis
 | 
				
			||||||
 | 
					      uses: github/codeql-action/analyze@v1
 | 
				
			||||||
							
								
								
									
										53
									
								
								.github/workflows/docker.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								.github/workflows/docker.yaml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,53 @@
 | 
				
			|||||||
 | 
					name: Publish Docker image
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    tags: [v*]
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  push_to_registries:
 | 
				
			||||||
 | 
					    name: Push Docker image to multiple registries
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      packages: write
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout
 | 
				
			||||||
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					      - name: Set up QEMU
 | 
				
			||||||
 | 
					        uses: docker/setup-qemu-action@v1
 | 
				
			||||||
 | 
					      - name: Docker meta
 | 
				
			||||||
 | 
					        id: meta
 | 
				
			||||||
 | 
					        uses: docker/metadata-action@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          images: |
 | 
				
			||||||
 | 
					            zadam/trilium
 | 
				
			||||||
 | 
					            ghcr.io/zadam/trilium
 | 
				
			||||||
 | 
					          tags: |
 | 
				
			||||||
 | 
					            type=semver,pattern={{version}}
 | 
				
			||||||
 | 
					            type=semver,pattern={{major}}.{{minor}}-latest
 | 
				
			||||||
 | 
					            type=match,pattern=(\d+.\d+).\d+\-beta,enable=${{ endsWith(github.ref, 'beta') }},group=1,suffix=-latest
 | 
				
			||||||
 | 
					      - name: Set up Docker Buildx
 | 
				
			||||||
 | 
					        uses: docker/setup-buildx-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          install: true
 | 
				
			||||||
 | 
					      - name: Log in to Docker Hub
 | 
				
			||||||
 | 
					        uses: docker/login-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          username: ${{ secrets.DOCKER_USERNAME }}
 | 
				
			||||||
 | 
					          password: ${{ secrets.DOCKER_PASSWORD }}
 | 
				
			||||||
 | 
					      - name: Log in to GitHub Docker Registry
 | 
				
			||||||
 | 
					        uses: docker/login-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          registry: ghcr.io
 | 
				
			||||||
 | 
					          username: ${{ github.repository_owner }}
 | 
				
			||||||
 | 
					          password: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					      - name: Create server-package.json
 | 
				
			||||||
 | 
					        run: cat package.json | grep -v electron > server-package.json
 | 
				
			||||||
 | 
					      - name: Build and Push
 | 
				
			||||||
 | 
					        uses: docker/build-push-action@v2.7.0
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          context: .
 | 
				
			||||||
 | 
					          platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
 | 
				
			||||||
 | 
					          push: true
 | 
				
			||||||
 | 
					          cache-from: type=registry,ref=zadam/trilium:buildcache
 | 
				
			||||||
 | 
					          cache-to: type=registry,ref=zadam/trilium:buildcache,mode=max
 | 
				
			||||||
 | 
					          tags: ${{ steps.meta.outputs.tags }}
 | 
				
			||||||
@@ -2,7 +2,7 @@ image:
 | 
				
			|||||||
  file: .gitpod.dockerfile
 | 
					  file: .gitpod.dockerfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tasks:
 | 
					tasks:
 | 
				
			||||||
    - before: nvm install 10 && nvm use 10
 | 
					    - before: nvm install 14.18.1 && nvm use 14.18.1
 | 
				
			||||||
      init: npm install
 | 
					      init: npm install
 | 
				
			||||||
      command: npm run start-server
 | 
					      command: npm run start-server
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										5
									
								
								.idea/dataSources.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5
									
								
								.idea/dataSources.xml
									
									
									
										generated
									
									
									
								
							@@ -1,11 +1,12 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
 | 
					  <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
 | 
				
			||||||
    <data-source source="LOCAL" name="document.db" uuid="4e69c96a-8a2b-43f5-9b40-d1608f75f7a4">
 | 
					    <data-source source="LOCAL" name="SQLite - document.db" uuid="30cef30d-e704-484d-a4ca-5d3bfc2ece63">
 | 
				
			||||||
      <driver-ref>sqlite.xerial</driver-ref>
 | 
					      <driver-ref>sqlite.xerial</driver-ref>
 | 
				
			||||||
      <synchronize>true</synchronize>
 | 
					      <synchronize>true</synchronize>
 | 
				
			||||||
      <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
 | 
					      <jdbc-driver>org.sqlite.JDBC</jdbc-driver>
 | 
				
			||||||
      <jdbc-url>jdbc:sqlite:$USER_HOME$/trilium-data/document.db</jdbc-url>
 | 
					      <jdbc-url>jdbc:sqlite:$PROJECT_DIR$/../trilium-data/document.db</jdbc-url>
 | 
				
			||||||
 | 
					      <working-dir>$ProjectFileDir$</working-dir>
 | 
				
			||||||
    </data-source>
 | 
					    </data-source>
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										2
									
								
								.idea/jsLibraryMappings.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.idea/jsLibraryMappings.xml
									
									
									
										generated
									
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="JavaScriptLibraryMappings">
 | 
					  <component name="JavaScriptLibraryMappings">
 | 
				
			||||||
    <file url="PROJECT" libraries="{@types/jquery}" />
 | 
					    <includedPredefinedLibrary name="Node.js Core" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										2
									
								
								.idea/misc.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								.idea/misc.xml
									
									
									
										generated
									
									
									
								
							@@ -3,7 +3,7 @@
 | 
				
			|||||||
  <component name="JavaScriptSettings">
 | 
					  <component name="JavaScriptSettings">
 | 
				
			||||||
    <option name="languageLevel" value="ES6" />
 | 
					    <option name="languageLevel" value="ES6" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
  <component name="ProjectRootManager">
 | 
					  <component name="ProjectRootManager" version="2" languageLevel="JDK_16" project-jdk-name="openjdk-16" project-jdk-type="JavaSDK">
 | 
				
			||||||
    <output url="file://$PROJECT_DIR$/out" />
 | 
					    <output url="file://$PROJECT_DIR$/out" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										10
									
								
								.idea/runConfigurations.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/runConfigurations.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<project version="4">
 | 
				
			||||||
 | 
					  <component name="RunConfigurationProducerService">
 | 
				
			||||||
 | 
					    <option name="ignoredProducers">
 | 
				
			||||||
 | 
					      <set>
 | 
				
			||||||
 | 
					        <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
 | 
				
			||||||
 | 
					      </set>
 | 
				
			||||||
 | 
					    </option>
 | 
				
			||||||
 | 
					  </component>
 | 
				
			||||||
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										1
									
								
								.idea/sqldialects.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								.idea/sqldialects.xml
									
									
									
										generated
									
									
									
								
							@@ -1,6 +1,7 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="SqlDialectMappings">
 | 
					  <component name="SqlDialectMappings">
 | 
				
			||||||
 | 
					    <file url="file://$PROJECT_DIR$" dialect="SQLite" />
 | 
				
			||||||
    <file url="PROJECT" dialect="SQLite" />
 | 
					    <file url="PROJECT" dialect="SQLite" />
 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
							
								
								
									
										1
									
								
								.idea/vcs.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1
									
								
								.idea/vcs.xml
									
									
									
										generated
									
									
									
								
							@@ -2,6 +2,5 @@
 | 
				
			|||||||
<project version="4">
 | 
					<project version="4">
 | 
				
			||||||
  <component name="VcsDirectoryMappings">
 | 
					  <component name="VcsDirectoryMappings">
 | 
				
			||||||
    <mapping directory="" vcs="Git" />
 | 
					    <mapping directory="" vcs="Git" />
 | 
				
			||||||
    <mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
 | 
					 | 
				
			||||||
  </component>
 | 
					  </component>
 | 
				
			||||||
</project>
 | 
					</project>
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
FROM node:12.19.0-alpine
 | 
					FROM node:14.18.1-alpine
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Create app directory
 | 
					# Create app directory
 | 
				
			||||||
WORKDIR /usr/src/app
 | 
					WORKDIR /usr/src/app
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,6 @@
 | 
				
			|||||||
# Trilium注意事项
 | 
					# Trilium笔记
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
					[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
				
			||||||
Trilium Notes是一个分层的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
 | 
					Trilium Notes是一个分层的笔记应用程序,专注于建立大型个人知识库。请参阅[屏幕截图](https://github.com/zadam/trilium/wiki/Screenshot-tour)以快速了解:
 | 
				
			||||||
@@ -35,6 +37,8 @@ Trilium是作为桌面应用程序(Linux和Windows)或服务器上托管的W
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
[有关文档页面的完整列表,请参见Wiki。](https://github.com/zadam/trilium/wiki/)
 | 
					[有关文档页面的完整列表,请参见Wiki。](https://github.com/zadam/trilium/wiki/)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[中文Wiki在这里](https://github.com/baddate/trilium/wiki/)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用Trilium的灵感。
 | 
					您还可以阅读[个人知识库模式](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base),以获取有关如何使用Trilium的灵感。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## 贡献
 | 
					## 贡献
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
# Trilium Notes
 | 
					# Trilium Notes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
					[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
				
			||||||
Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases. See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview:
 | 
					Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases. See [screenshots](https://github.com/zadam/trilium/wiki/Screenshot-tour) for quick overview:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -55,3 +57,7 @@ npm run start-server
 | 
				
			|||||||
* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
 | 
					* [FancyTree](https://github.com/mar10/fancytree) - very feature rich tree library without real competition. Trilium Notes would not be the same without it.
 | 
				
			||||||
* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
 | 
					* [CodeMirror](https://github.com/codemirror/CodeMirror) - code editor with support for huge amount of languages
 | 
				
			||||||
* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map)
 | 
					* [jsPlumb](https://github.com/jsplumb/jsplumb) - visual connectivity library without competition. Used in [relation maps](https://github.com/zadam/trilium/wiki/Relation-map) and [link maps](https://github.com/zadam/trilium/wiki/Link-map)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## License
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										63
									
								
								README.ru.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								README.ru.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,63 @@
 | 
				
			|||||||
 | 
					# Trilium Notes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[English](https://github.com/zadam/trilium/blob/master/README.md) | [Chinese](https://github.com/zadam/trilium/blob/master/README-ZH_CN.md) | [Russian](https://github.com/zadam/trilium/blob/master/README.ru.md)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[](https://gitter.im/trilium-notes/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 | 
				
			||||||
 | 
					Trilium Notes – это приложение для заметок с иерархической структурой, ориентированное на создание больших персональных баз знаний. Для быстрого ознакомления посмотрите [скриншот-тур](https://github.com/zadam/trilium/wiki/Screenshot-tour):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Возможности
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Заметки можно расположить в виде дерева произвольной глубины. Отдельную заметку можно разместить в нескольких местах дерева (см. [клонирование](https://github.com/zadam/trilium/wiki/Cloning-notes))
 | 
				
			||||||
 | 
					* Продвинутый визуальный редактор (WYSIWYG) позволяет работать с таблицами, изображениями, [формулами](https://github.com/zadam/trilium/wiki/Text-notes#math-support) и разметкой markdown, имеет [автоформатирование](https://github.com/zadam/trilium/wiki/Text-notes#autoformat)
 | 
				
			||||||
 | 
					* Редактирование [заметок с исходным кодом](https://github.com/zadam/trilium/wiki/Code-notes), включая подсветку синтаксиса
 | 
				
			||||||
 | 
					* Быстрая и простая [навигация между заметками](https://github.com/zadam/trilium/wiki/Note-navigation), полнотекстовый поиск и [выделение заметок](https://github.com/zadam/trilium/wiki/Note-hoisting) в отдельный блок
 | 
				
			||||||
 | 
					* Бесшовное [версионирование заметки](https://github.com/zadam/trilium/wiki/Note-revisions)
 | 
				
			||||||
 | 
					* Специальные [атрибуты](https://github.com/zadam/trilium/wiki/Attributes) позволяют гибко организовать структуру, используются для поиска и продвинутого [скриптинга](https://github.com/zadam/trilium/wiki/Scripts)
 | 
				
			||||||
 | 
					* [Синхронизация](https://github.com/zadam/trilium/wiki/Synchronization) заметок со своим сервером
 | 
				
			||||||
 | 
					* Надёжное [шифрование](https://github.com/zadam/trilium/wiki/Protected-notes) с детализацией по каждой заметке
 | 
				
			||||||
 | 
					* [Карты связей](https://github.com/zadam/trilium/wiki/Relation-map) и [карты ссылок](https://github.com/zadam/trilium/wiki/Link-map) для визуализации их взяимосвязей
 | 
				
			||||||
 | 
					* [Скрипты](https://github.com/zadam/trilium/wiki/Scripts) - см. [продвинутые примеры](https://github.com/zadam/trilium/wiki/Advanced-showcases)
 | 
				
			||||||
 | 
					* Хорошо масштабируется, как по удобству использования, так и по производительности до 100000 заметок
 | 
				
			||||||
 | 
					* Оптимизированный [мобильный фронтенд](https://github.com/zadam/trilium/wiki/Mobile-frontend) смартфонов и планшетов
 | 
				
			||||||
 | 
					* [Темная тема](https://github.com/zadam/trilium/wiki/Themes)
 | 
				
			||||||
 | 
					* Импорт и экпорт [Evernote](https://github.com/zadam/trilium/wiki/Evernote-import) и данных в [markdown](https://github.com/zadam/trilium/wiki/Markdown) формате
 | 
				
			||||||
 | 
					* [Web Clipper](https://github.com/zadam/trilium/wiki/Web-clipper) для удобного сохранения веб-контента
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Сборки
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Trilium предоставляется в виде десктопного приложения (Linux и Windows) или веб-приложения, размещенного на вашем сервере (Linux). Доступна сборка Mac OS, но она [не поддерживается](https://github.com/zadam/trilium/wiki/FAQ#mac-os-support).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* Если вы хотите использовать Trilium на десктопе, скачайте архив для своей платформы со страницы [релизов](https://github.com/zadam/trilium/releases/latest), распакуйте и запустите исполняемый файл ```trilium```.
 | 
				
			||||||
 | 
					* Если вы хотите установить Trilium на сервере, следуйте этой [инструкции](https://github.com/zadam/trilium/wiki/Server-installation).
 | 
				
			||||||
 | 
					  * В данный момент поддерживаются (протестированы) последние версии браузеров Chrome и Firefox.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Документация
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Полный список страниц документации доступен в Wiki.](https://github.com/zadam/trilium/wiki/)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Вы также можете ознакомиться с [шаблонами персональных баз знаний](https://github.com/zadam/trilium/wiki/Patterns-of-personal-knowledge-base), чтобы получить представление о том, как можно использовать Trilium.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Участвуйте в разработке
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Используйте онлайн среду разработки в браузере
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[](https://gitpod.io/#https://github.com/zadam/trilium)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Или склонируйте на своё устройство и запустите
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					npm install
 | 
				
			||||||
 | 
					npm run start-server
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Благодарности
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* [CKEditor 5](https://github.com/ckeditor/ckeditor5) - лучший WYSIWYG редактор, очень активная и внимательная команда.
 | 
				
			||||||
 | 
					* [FancyTree](https://github.com/mar10/fancytree) - многофункциональная библиотека для создания древовидных структур. Вне конкуренции. Без него Trilium Notes не были бы таким.
 | 
				
			||||||
 | 
					* [CodeMirror](https://github.com/codemirror/CodeMirror) - редактор кода с поддержкой огромного количество языков.
 | 
				
			||||||
 | 
					* [jsPlumb](https://github.com/jsplumb/jsplumb) - библиотека для визуализации связей. Вне конкуренции. Используется в [картах связей](https://github.com/zadam/trilium/wiki/Relation-map) и [картах ссылок](https://github.com/zadam/trilium/wiki/Link-map).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Лицензия
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Эта программа является бесплатным программным обеспечением: вы можете распространять и/или изменять ее в соответствии с условиями GNU Affero General Public License, опубликованной Free Software Foundation, либо версии 3 Лицензии, либо (по вашему выбору) любой более поздней версии.
 | 
				
			||||||
							
								
								
									
										3
									
								
								TODO
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								TODO
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					- new icon
 | 
				
			||||||
 | 
					- polish becca entities API
 | 
				
			||||||
 | 
					- separate private and public APIs in becca entities
 | 
				
			||||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -27,8 +27,14 @@ cp images/app-icons/png/128x128.png $BUILD_DIR/icon.png
 | 
				
			|||||||
# removing software WebGL binaries because they are pretty huge and not necessary
 | 
					# removing software WebGL binaries because they are pretty huge and not necessary
 | 
				
			||||||
rm -r $BUILD_DIR/swiftshader
 | 
					rm -r $BUILD_DIR/swiftshader
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cp bin/tpl/portable-trilium.sh $BUILD_DIR/
 | 
					cp bin/tpl/trilium-portable.sh $BUILD_DIR/
 | 
				
			||||||
chmod 755 $BUILD_DIR/portable-trilium.sh
 | 
					chmod 755 $BUILD_DIR/trilium-portable.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp bin/tpl/trilium-safe-mode.sh $BUILD_DIR/
 | 
				
			||||||
 | 
					chmod 755 $BUILD_DIR/trilium-safe-mode.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp bin/tpl/trilium-no-cert-check.sh $BUILD_DIR/
 | 
				
			||||||
 | 
					chmod 755 $BUILD_DIR/trilium-no-cert-check.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Packaging linux x64 electron distribution..."
 | 
					echo "Packaging linux x64 electron distribution..."
 | 
				
			||||||
VERSION=`jq -r ".version" package.json`
 | 
					VERSION=`jq -r ".version" package.json`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/usr/bin/env bash
 | 
					#!/usr/bin/env bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKG_DIR=dist/trilium-linux-x64-server
 | 
					PKG_DIR=dist/trilium-linux-x64-server
 | 
				
			||||||
NODE_VERSION=12.19.0
 | 
					NODE_VERSION=14.18.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$1" != "DONTCOPY" ]
 | 
					if [ "$1" != "DONTCOPY" ]
 | 
				
			||||||
then
 | 
					then
 | 
				
			||||||
@@ -10,7 +10,7 @@ fi
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
cd dist
 | 
					cd dist
 | 
				
			||||||
wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
					wget https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
				
			||||||
tar xvfJ node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
					tar xfJ node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
				
			||||||
rm node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
					rm node-v${NODE_VERSION}-linux-x64.tar.xz
 | 
				
			||||||
cd ..
 | 
					cd ..
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,7 +25,9 @@ mv "./dist/Trilium Notes-win32-x64" $BUILD_DIR
 | 
				
			|||||||
# removing software WebGL binaries because they are pretty huge and not necessary
 | 
					# removing software WebGL binaries because they are pretty huge and not necessary
 | 
				
			||||||
rm -r $BUILD_DIR/swiftshader
 | 
					rm -r $BUILD_DIR/swiftshader
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cp bin/tpl/portable-trilium.bat $BUILD_DIR/
 | 
					cp bin/tpl/trilium-portable.bat $BUILD_DIR/
 | 
				
			||||||
 | 
					cp bin/tpl/trilium-no-cert-check.bat $BUILD_DIR/
 | 
				
			||||||
 | 
					cp bin/tpl/trilium-safe-mode.bat $BUILD_DIR/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Zipping windows x64 electron distribution..."
 | 
					echo "Zipping windows x64 electron distribution..."
 | 
				
			||||||
VERSION=`jq -r ".version" package.json`
 | 
					VERSION=`jq -r ".version" package.json`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then
 | 
				
			|||||||
    exit 1
 | 
					    exit 1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
npm run webpack
 | 
					n exec 14.18.1 npm run webpack
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DIR=$1
 | 
					DIR=$1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -27,7 +27,7 @@ cp -r electron.js $DIR/
 | 
				
			|||||||
cp webpack-* $DIR/
 | 
					cp webpack-* $DIR/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# run in subshell (so we return to original dir)
 | 
					# run in subshell (so we return to original dir)
 | 
				
			||||||
(cd $DIR && npm install --only=prod)
 | 
					(cd $DIR && n exec 14.18.1 npm install --only=prod)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# cleanup of useless files in dependencies
 | 
					# cleanup of useless files in dependencies
 | 
				
			||||||
rm -r $DIR/node_modules/image-q/demo
 | 
					rm -r $DIR/node_modules/image-q/demo
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,9 +8,9 @@ fi
 | 
				
			|||||||
VERSION=$1
 | 
					VERSION=$1
 | 
				
			||||||
SERIES=${VERSION:0:4}-latest
 | 
					SERIES=${VERSION:0:4}-latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sudo docker push zadam/trilium:$VERSION
 | 
					docker push zadam/trilium:$VERSION
 | 
				
			||||||
sudo docker push zadam/trilium:$SERIES
 | 
					docker push zadam/trilium:$SERIES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ $1 != *"beta"* ]]; then
 | 
					if [[ $1 != *"beta"* ]]; then
 | 
				
			||||||
  sudo docker push zadam/trilium:latest
 | 
					  docker push zadam/trilium:latest
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -55,54 +55,17 @@ echo "Creating release in GitHub"
 | 
				
			|||||||
EXTRA=
 | 
					EXTRA=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [[ $TAG == *"beta"* ]]; then
 | 
					if [[ $TAG == *"beta"* ]]; then
 | 
				
			||||||
  EXTRA=--pre-release
 | 
					  EXTRA=--prerelease
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
github-release release \
 | 
					echo "$GITHUB_CLI_AUTH_TOKEN" | gh auth login --with-token
 | 
				
			||||||
    --tag $TAG \
 | 
					 | 
				
			||||||
    --name "$TAG release" $EXTRA
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Uploading debian x64 package"
 | 
					gh release create "$TAG" \
 | 
				
			||||||
 | 
					    --title "$TAG release" \
 | 
				
			||||||
github-release upload \
 | 
					    --notes "" \
 | 
				
			||||||
    --tag $TAG \
 | 
					    $EXTRA \
 | 
				
			||||||
    --name "$DEBIAN_X64_BUILD" \
 | 
					    "dist/$DEBIAN_X64_BUILD" \
 | 
				
			||||||
    --file "dist/$DEBIAN_X64_BUILD"
 | 
					    "dist/$LINUX_X64_BUILD" \
 | 
				
			||||||
 | 
					    "dist/$WINDOWS_X64_BUILD" \
 | 
				
			||||||
echo "Uploading linux x64 build"
 | 
					    "dist/$MAC_X64_BUILD" \
 | 
				
			||||||
 | 
					    "dist/$SERVER_BUILD"
 | 
				
			||||||
github-release upload \
 | 
					 | 
				
			||||||
    --tag $TAG \
 | 
					 | 
				
			||||||
    --name "$LINUX_X64_BUILD" \
 | 
					 | 
				
			||||||
    --file "dist/$LINUX_X64_BUILD"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Uploading windows x64 build"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
github-release upload \
 | 
					 | 
				
			||||||
    --tag $TAG \
 | 
					 | 
				
			||||||
    --name "$WINDOWS_X64_BUILD" \
 | 
					 | 
				
			||||||
    --file "dist/$WINDOWS_X64_BUILD"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Uploading mac x64 build"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
github-release upload \
 | 
					 | 
				
			||||||
    --tag $TAG \
 | 
					 | 
				
			||||||
    --name "$MAC_X64_BUILD" \
 | 
					 | 
				
			||||||
    --file "dist/$MAC_X64_BUILD"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Uploading linux x64 server build"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
github-release upload \
 | 
					 | 
				
			||||||
    --tag $TAG \
 | 
					 | 
				
			||||||
    --name "$SERVER_BUILD" \
 | 
					 | 
				
			||||||
    --file "dist/$SERVER_BUILD"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Building docker image"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bin/build-docker.sh $VERSION
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Pushing docker image to dockerhub"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
bin/push-docker-image.sh $VERSION
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
echo "Release finished!"
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								bin/tpl/trilium-no-cert-check.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								bin/tpl/trilium-no-cert-check.bat
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					SET DIR=%~dp0
 | 
				
			||||||
 | 
					set NODE_TLS_REJECT_UNAUTHORIZED=0
 | 
				
			||||||
 | 
					cd %DIR%
 | 
				
			||||||
 | 
					start trilium.exe
 | 
				
			||||||
							
								
								
									
										7
									
								
								bin/tpl/trilium-no-cert-check.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								bin/tpl/trilium-no-cert-check.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DIR=`dirname "$0"`
 | 
				
			||||||
 | 
					export NODE_TLS_REJECT_UNAUTHORIZED=0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"$DIR/trilium"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								bin/tpl/trilium-safe-mode.bat
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								bin/tpl/trilium-safe-mode.bat
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					SET DIR=%~dp0
 | 
				
			||||||
 | 
					SET TRILIUM_SAFE_MODE=1
 | 
				
			||||||
 | 
					cd %DIR%
 | 
				
			||||||
 | 
					start trilium.exe
 | 
				
			||||||
							
								
								
									
										7
									
								
								bin/tpl/trilium-safe-mode.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								bin/tpl/trilium-safe-mode.sh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					#!/usr/bin/env sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DIR=`dirname "$0"`
 | 
				
			||||||
 | 
					export TRILIUM_SAFE_MODE=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					"$DIR/trilium"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										11
									
								
								db/TODO.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								db/TODO.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					- drop branches.utcDateCreated - not used for anything
 | 
				
			||||||
 | 
					- drop options.utcDateCreated - not used for anything
 | 
				
			||||||
 | 
					- isDeleted = 0 by default
 | 
				
			||||||
 | 
					- rename openTabs to openNoteContexts
 | 
				
			||||||
 | 
					- migrate black theme to dark theme
 | 
				
			||||||
 | 
					- unify readOnly handling to a single attribute:
 | 
				
			||||||
 | 
					  * readOnly - like now
 | 
				
			||||||
 | 
					  * readOnly=auto - like without readOnly (used to override inherited readOnly)
 | 
				
			||||||
 | 
					  * readOnly=never - like autoReadOnlyDisabled
 | 
				
			||||||
 | 
					- remove focusOnAttributesKeyboardShortcut
 | 
				
			||||||
 | 
					- rename white theme to "light" theme (it's not completely white and matches well to dark theme)
 | 
				
			||||||
							
								
								
									
										
											BIN
										
									
								
								db/demo.zip
									
									
									
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								db/demo.zip
									
									
									
									
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -1,11 +0,0 @@
 | 
				
			|||||||
DROP TABLE IF EXISTS anchors;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS attachments;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS bookmarks;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS custom_properties;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS deletions;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS deletions_attachments;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS formatting;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS icons;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS tags;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS tags_notes;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS tasks;
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
CREATE TABLE notes_mig AS SELECT note_id, note_title, note_text, note_clone_id, date_created, date_modified, encryption FROM notes;
 | 
					 | 
				
			||||||
DROP TABLE notes;
 | 
					 | 
				
			||||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE notes ADD COLUMN is_deleted INTEGER NOT NULL DEFAULT 0
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE notes_tree ADD COLUMN date_modified INTEGER NOT NULL DEFAULT 0
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
DELETE FROM options WHERE opt_name IN ('is_readonly', 'prop_modified', 'doc_title', 'doc_UID', 'format_version', 'flask_secret_key')
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
CREATE TABLE notes_history_mig AS SELECT id, note_id, note_title, note_text, date_modified AS date_modified_from, date_modified AS date_modified_to FROM notes_history;
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE notes_history ADD COLUMN encryption INTEGER DEFAULT 0
 | 
					 | 
				
			||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `notes_history_mig` (
 | 
					 | 
				
			||||||
	`id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,
 | 
					 | 
				
			||||||
	`note_id`	INT,
 | 
					 | 
				
			||||||
	`note_title`	TEXT,
 | 
					 | 
				
			||||||
	`note_text`	TEXT,
 | 
					 | 
				
			||||||
	`date_modified_from`	INT,
 | 
					 | 
				
			||||||
	`date_modified_to`	INT,
 | 
					 | 
				
			||||||
	`encryption`	INTEGER DEFAULT 0
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_history (id, note_id, note_title, note_text, date_modified_from, date_modified_to, encryption)
 | 
					 | 
				
			||||||
    SELECT id, note_id, note_title, note_text, date_modified_from, date_modified_to, encryption FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
@@ -1,41 +0,0 @@
 | 
				
			|||||||
CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
					 | 
				
			||||||
	`note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_images_note_id` ON `images` (
 | 
					 | 
				
			||||||
	`note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_links_note_id` ON `links` (
 | 
					 | 
				
			||||||
	`note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_audit_log_note_id` ON `audit_log` (
 | 
					 | 
				
			||||||
	`note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_audit_log_date_modified` ON `audit_log` (
 | 
					 | 
				
			||||||
	`date_modified`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `notes_mig` (
 | 
					 | 
				
			||||||
	`note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`note_title`	TEXT,
 | 
					 | 
				
			||||||
	`note_text`	TEXT,
 | 
					 | 
				
			||||||
	`note_clone_id`	TEXT,
 | 
					 | 
				
			||||||
	`date_created`	INT,
 | 
					 | 
				
			||||||
	`date_modified`	INT,
 | 
					 | 
				
			||||||
	`encryption`	INT,
 | 
					 | 
				
			||||||
	`is_deleted`	INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
	PRIMARY KEY(`note_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_mig (note_id, note_title, note_text, note_clone_id, date_created, date_modified, encryption)
 | 
					 | 
				
			||||||
    SELECT note_id, note_title, note_text, note_clone_id, date_created, date_modified, encryption FROM notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes;
 | 
					 | 
				
			||||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_is_deleted` ON `notes` (
 | 
					 | 
				
			||||||
	`is_deleted`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
ALTER TABLE notes_tree ADD COLUMN is_deleted INTEGER NOT NULL DEFAULT 0;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_is_deleted` ON `notes_tree` (
 | 
					 | 
				
			||||||
	`is_deleted`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
INSERT INTO options (opt_name, opt_value) VALUES ('last_synced', 0)
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
CREATE UNIQUE INDEX `IDX_notes_history_note_from_to` ON `notes_history` (
 | 
					 | 
				
			||||||
	`note_id`,
 | 
					 | 
				
			||||||
	`date_modified_from`,
 | 
					 | 
				
			||||||
	`date_modified_to`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
UPDATE options SET opt_name = 'last_synced_pull' WHERE opt_name = 'last_synced';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO options (opt_name, opt_value) VALUES ('last_synced_push', 0);
 | 
					 | 
				
			||||||
@@ -1,16 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `audit_log_mig` (
 | 
					 | 
				
			||||||
	`id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
	`date_modified`	INTEGER NOT NULL,
 | 
					 | 
				
			||||||
	`category`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`browser_id`	TEXT,
 | 
					 | 
				
			||||||
	`note_id`	TEXT,
 | 
					 | 
				
			||||||
	`change_from`	TEXT,
 | 
					 | 
				
			||||||
	`change_to`	TEXT,
 | 
					 | 
				
			||||||
	`comment`	TEXT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO audit_log_mig (id, date_modified, category, browser_id, note_id, change_from, change_to)
 | 
					 | 
				
			||||||
    SELECT id, date_modified, category, browser_id, note_id, change_from, change_to FROM audit_log;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE audit_log;
 | 
					 | 
				
			||||||
ALTER TABLE audit_log_mig RENAME TO audit_log;
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
UPDATE notes SET note_id = substr(note_id, 0, 22);
 | 
					 | 
				
			||||||
UPDATE notes_tree SET note_id = substr(note_id, 0, 22), note_pid = substr(note_pid, 0, 22);
 | 
					 | 
				
			||||||
UPDATE notes_history SET note_id = substr(note_id, 0, 22);
 | 
					 | 
				
			||||||
UPDATE audit_log SET note_id = substr(note_id, 0, 22);
 | 
					 | 
				
			||||||
UPDATE links SET note_id = substr(note_id, 0, 22);
 | 
					 | 
				
			||||||
UPDATE images SET note_id = substr(note_id, 0, 22);
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
UPDATE notes SET note_id = substr(note_id, 0, 13);
 | 
					 | 
				
			||||||
UPDATE notes_tree SET note_id = substr(note_id, 0, 13), note_pid = substr(note_pid, 0, 13);
 | 
					 | 
				
			||||||
UPDATE notes_history SET note_id = substr(note_id, 0, 13);
 | 
					 | 
				
			||||||
UPDATE audit_log SET note_id = substr(note_id, 0, 13);
 | 
					 | 
				
			||||||
UPDATE links SET note_id = substr(note_id, 0, 13);
 | 
					 | 
				
			||||||
UPDATE images SET note_id = substr(note_id, 0, 13);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
INSERT INTO options (opt_name, opt_value) VALUES ('document_id', '');
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
INSERT INTO options (opt_name, opt_value) VALUES ('document_secret', '');
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE options ADD COLUMN date_modified INTEGER NOT NULL DEFAULT 0
 | 
					 | 
				
			||||||
@@ -1,15 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `sync` (
 | 
					 | 
				
			||||||
	`id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
					 | 
				
			||||||
	`entity_name`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`entity_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`sync_date`	INTEGER NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE UNIQUE INDEX `IDX_sync_entity_name_id` ON `sync` (
 | 
					 | 
				
			||||||
	`entity_name`,
 | 
					 | 
				
			||||||
	`entity_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_sync_sync_date` ON `sync` (
 | 
					 | 
				
			||||||
	`sync_date`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE sync ADD COLUMN source_id TEXT
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
ALTER TABLE notes_history ADD COLUMN note_history_id TEXT;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
UPDATE notes_history SET note_history_id = id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE UNIQUE INDEX `IDX_note_history_note_history_id` ON `notes_history` (
 | 
					 | 
				
			||||||
	`note_history_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,27 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `notes_history_mig` (
 | 
					 | 
				
			||||||
	`note_history_id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
	`note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`note_title`	TEXT,
 | 
					 | 
				
			||||||
	`note_text`	TEXT,
 | 
					 | 
				
			||||||
	`encryption`	INT,
 | 
					 | 
				
			||||||
	`date_modified_from` INT,
 | 
					 | 
				
			||||||
	`date_modified_to` INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, encryption, date_modified_from, date_modified_to)
 | 
					 | 
				
			||||||
    SELECT note_history_id, note_id, note_title, note_text, encryption, date_modified_from, date_modified_to FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
					 | 
				
			||||||
	`note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` (
 | 
					 | 
				
			||||||
	`date_modified_from`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` (
 | 
					 | 
				
			||||||
	`date_modified_to`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,11 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `options_mig` (
 | 
					 | 
				
			||||||
	`opt_name`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
	`opt_value`	TEXT,
 | 
					 | 
				
			||||||
	`date_modified` INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO options_mig (opt_name, opt_value, date_modified)
 | 
					 | 
				
			||||||
    SELECT opt_name, opt_value, date_modified FROM options;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE options;
 | 
					 | 
				
			||||||
ALTER TABLE options_mig RENAME TO options;
 | 
					 | 
				
			||||||
@@ -1,10 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `event_log` (
 | 
					 | 
				
			||||||
	`id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
					 | 
				
			||||||
	`note_id`	TEXT,
 | 
					 | 
				
			||||||
	`comment`	TEXT,
 | 
					 | 
				
			||||||
	`date_added`	INTEGER NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_event_log_date_added` ON `event_log` (
 | 
					 | 
				
			||||||
	`date_added`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
	`note_id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
	`date_accessed`	INTEGER NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE recent_notes ADD COLUMN is_deleted INT;
 | 
					 | 
				
			||||||
@@ -1,52 +0,0 @@
 | 
				
			|||||||
UPDATE audit_log SET category = 'PROTECTED' WHERE category = 'ENCRYPTION';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DELETE FROM notes WHERE note_clone_id IS NOT NULL AND note_clone_id != '';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `notes_mig` (
 | 
					 | 
				
			||||||
	`note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`note_title`	TEXT,
 | 
					 | 
				
			||||||
	`note_text`	TEXT,
 | 
					 | 
				
			||||||
	`date_created`	INT,
 | 
					 | 
				
			||||||
	`date_modified`	INT,
 | 
					 | 
				
			||||||
	`is_protected`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
	`is_deleted`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
	PRIMARY KEY(`note_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_mig (note_id, note_title, note_text, date_created, date_modified, is_protected, is_deleted)
 | 
					 | 
				
			||||||
    SELECT note_id, note_title, note_text, date_created, date_modified, encryption, is_deleted FROM notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes;
 | 
					 | 
				
			||||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_is_deleted` ON `notes` (
 | 
					 | 
				
			||||||
	`is_deleted`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `notes_history_mig` (
 | 
					 | 
				
			||||||
	`note_history_id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
	`note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`note_title`	TEXT,
 | 
					 | 
				
			||||||
	`note_text`	TEXT,
 | 
					 | 
				
			||||||
	`is_protected`	INT,
 | 
					 | 
				
			||||||
	`date_modified_from` INT,
 | 
					 | 
				
			||||||
	`date_modified_to` INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to)
 | 
					 | 
				
			||||||
                        SELECT note_history_id, note_id, note_title, note_text, encryption, date_modified_from, date_modified_to FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
					 | 
				
			||||||
	`note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` (
 | 
					 | 
				
			||||||
	`date_modified_from`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` (
 | 
					 | 
				
			||||||
	`date_modified_to`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
UPDATE options SET opt_name = 'protected_session_timeout' WHERE opt_name = 'encryption_session_timeout';
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
module.exports = async () => console.log("heeeelllooo!!!");
 | 
					 | 
				
			||||||
@@ -1,44 +0,0 @@
 | 
				
			|||||||
const sql = require('../services/sql');
 | 
					 | 
				
			||||||
const data_encryption = require('../services/data_encryption');
 | 
					 | 
				
			||||||
const password_encryption = require('../services/password_encryption');
 | 
					 | 
				
			||||||
const readline = require('readline');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const cl = readline.createInterface(process.stdin, process.stdout);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function question(q) {
 | 
					 | 
				
			||||||
    return new Promise( (res, rej) => {
 | 
					 | 
				
			||||||
        cl.question( q, answer => {
 | 
					 | 
				
			||||||
            res(answer);
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
module.exports = async () => {
 | 
					 | 
				
			||||||
    const password = await question("Enter password: ");
 | 
					 | 
				
			||||||
    const dataKey = await password_encryption.getDecryptedDataKey(password);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const protectedNotes = await sql.getRows("SELECT * FROM notes WHERE is_protected = 1");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (const note of protectedNotes) {
 | 
					 | 
				
			||||||
        const decryptedTitle = data_encryption.decrypt(dataKey, note.note_title);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        note.note_title = data_encryption.encrypt(dataKey, "0" + note.note_id, decryptedTitle);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const decryptedText = data_encryption.decrypt(dataKey, note.note_text);
 | 
					 | 
				
			||||||
        note.note_text = data_encryption.encrypt(dataKey, "1" + note.note_id, decryptedText);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        await sql.execute("UPDATE notes SET note_title = ?, note_text = ? WHERE note_id = ?", [note.note_title, note.note_text, note.note_id]);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    const protectedNotesHistory = await sql.getRows("SELECT * FROM notes_history WHERE is_protected = 1");
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    for (const noteHistory of protectedNotesHistory) {
 | 
					 | 
				
			||||||
        const decryptedTitle = data_encryption.decrypt(dataKey, noteHistory.note_title);
 | 
					 | 
				
			||||||
        noteHistory.note_title = data_encryption.encrypt(dataKey, "0" + noteHistory.note_history_id, decryptedTitle);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        const decryptedText = data_encryption.decrypt(dataKey, noteHistory.note_text);
 | 
					 | 
				
			||||||
        noteHistory.note_text = data_encryption.encrypt(dataKey, "1" + noteHistory.note_history_id, decryptedText);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        await sql.execute("UPDATE notes SET note_title = ?, note_text = ? WHERE note_id = ?", [noteHistory.note_title, noteHistory.note_text, noteHistory.note_history_id]);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
INSERT INTO options (opt_name, opt_value) VALUES ('encrypted_data_key_iv', '')
 | 
					 | 
				
			||||||
@@ -1,25 +0,0 @@
 | 
				
			|||||||
const password_encryption = require('../services/password_encryption');
 | 
					 | 
				
			||||||
const readline = require('readline');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const cl = readline.createInterface(process.stdin, process.stdout);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
function question(q) {
 | 
					 | 
				
			||||||
    return new Promise( (res, rej) => {
 | 
					 | 
				
			||||||
        cl.question( q, answer => {
 | 
					 | 
				
			||||||
            res(answer);
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
module.exports = async () => {
 | 
					 | 
				
			||||||
    const password = await question("Enter password: ");
 | 
					 | 
				
			||||||
    let dataKey = await password_encryption.getDecryptedDataKey(password);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    console.log("Original data key: ", dataKey);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    dataKey = dataKey.slice(0, 16);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    console.log("Trimmed data key: ", dataKey);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    await password_encryption.setDataKey(password, dataKey);
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
CREATE TABLE `source_ids` (
 | 
					 | 
				
			||||||
	`source_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
	`date_created`	INTEGER NOT NULL,
 | 
					 | 
				
			||||||
	PRIMARY KEY(`source_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
UPDATE notes_tree SET note_pid = 'root' WHERE note_pid = ''
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
DELETE FROM sync;
 | 
					 | 
				
			||||||
@@ -1,21 +0,0 @@
 | 
				
			|||||||
CREATE TABLE [notes_tree_mig] (
 | 
					 | 
				
			||||||
    [note_tree_id] VARCHAR(30) PRIMARY KEY NOT NULL,
 | 
					 | 
				
			||||||
    [note_id] VARCHAR(30) UNIQUE NOT NULL,
 | 
					 | 
				
			||||||
    [note_pid] VARCHAR(30) NOT NULL,
 | 
					 | 
				
			||||||
    [note_pos] INTEGER NOT NULL,
 | 
					 | 
				
			||||||
    [is_expanded] BOOLEAN NULL ,
 | 
					 | 
				
			||||||
    date_modified INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
    is_deleted INTEGER NOT NULL DEFAULT 0
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_tree_mig (note_tree_id, note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted)
 | 
					 | 
				
			||||||
    SELECT 'TT' || SUBSTR(note_id, 3), note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
UPDATE notes_tree_mig SET note_pid = 'TT' || SUBSTR(note_pid, 3) WHERE note_pid != 'root';
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_tree;
 | 
					 | 
				
			||||||
ALTER TABLE notes_tree_mig RENAME TO notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
	`note_tree_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
UPDATE options SET opt_name = 'start_note_tree_id' WHERE opt_name = 'start_node';
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
DROP TABLE recent_notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
    `note_tree_id` TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
    `date_accessed` INTEGER NOT NULL ,
 | 
					 | 
				
			||||||
    is_deleted INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
UPDATE
 | 
					 | 
				
			||||||
    notes_tree
 | 
					 | 
				
			||||||
SET
 | 
					 | 
				
			||||||
    note_pid = (SELECT parent.note_id FROM notes_tree parent WHERE notes_tree.note_pid = parent.note_tree_id)
 | 
					 | 
				
			||||||
WHERE
 | 
					 | 
				
			||||||
    note_pid != 'root'
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
DROP TABLE recent_notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
    `note_path` TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
    `date_accessed` INTEGER NOT NULL ,
 | 
					 | 
				
			||||||
    is_deleted INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,24 +0,0 @@
 | 
				
			|||||||
CREATE TABLE "notes_tree_mig" (
 | 
					 | 
				
			||||||
    [note_tree_id] VARCHAR(30) PRIMARY KEY NOT NULL,
 | 
					 | 
				
			||||||
    [note_id] VARCHAR(30) NOT NULL,
 | 
					 | 
				
			||||||
    [note_pid] VARCHAR(30) NOT NULL,
 | 
					 | 
				
			||||||
    [note_pos] INTEGER NOT NULL,
 | 
					 | 
				
			||||||
    [is_expanded] BOOLEAN NULL ,
 | 
					 | 
				
			||||||
    date_modified INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
    is_deleted INTEGER NOT NULL DEFAULT 0
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_tree_mig (note_tree_id, note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted)
 | 
					 | 
				
			||||||
    SELECT note_tree_id, note_id, note_pid, note_pos, is_expanded, date_modified, is_deleted FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_tree;
 | 
					 | 
				
			||||||
ALTER TABLE notes_tree_mig RENAME TO notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
	`note_tree_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id_note_pid` ON `notes_tree` (
 | 
					 | 
				
			||||||
	`note_id`,
 | 
					 | 
				
			||||||
	`note_pid`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
DELETE FROM sync;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
UPDATE options SET opt_value = 0 WHERE opt_name IN ('last_synced_push', 'last_synced_pull');
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
DROP TABLE audit_log;
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
ALTER TABLE notes_tree ADD COLUMN `prefix` TEXT
 | 
					 | 
				
			||||||
@@ -1,2 +0,0 @@
 | 
				
			|||||||
DROP TABLE IF EXISTS links;
 | 
					 | 
				
			||||||
DROP TABLE IF EXISTS images;
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
SELECT 1;
 | 
					 | 
				
			||||||
@@ -1,10 +0,0 @@
 | 
				
			|||||||
DROP TABLE recent_notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
  'note_tree_id'TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
  `note_path` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_accessed` INTEGER NOT NULL ,
 | 
					 | 
				
			||||||
  is_deleted INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DELETE FROM sync WHERE entity_name = 'recent_notes';
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
UPDATE options SET opt_name = 'start_note_path' WHERE opt_name = 'start_note_tree_id';
 | 
					 | 
				
			||||||
@@ -1,156 +0,0 @@
 | 
				
			|||||||
DROP TABLE migrations;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Sync
 | 
					 | 
				
			||||||
CREATE TABLE `sync_mig` (
 | 
					 | 
				
			||||||
    `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
					 | 
				
			||||||
    `entity_name`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `entity_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `source_id` TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `sync_date`	TEXT NOT NULL);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO sync_mig (id, entity_name, entity_id, source_id, sync_date)
 | 
					 | 
				
			||||||
               SELECT id, entity_name, entity_id, source_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', sync_date, 'unixepoch') FROM sync;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE sync;
 | 
					 | 
				
			||||||
ALTER TABLE sync_mig RENAME TO sync;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE UNIQUE INDEX `IDX_sync_entity_name_id` ON `sync` (
 | 
					 | 
				
			||||||
  `entity_name`,
 | 
					 | 
				
			||||||
  `entity_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_sync_sync_date` ON `sync` (
 | 
					 | 
				
			||||||
  `sync_date`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Options
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
UPDATE options SET opt_value = strftime('%Y-%m-%dT%H:%M:%S.000Z', opt_value, 'unixepoch') WHERE opt_name IN ('last_backup_date');
 | 
					 | 
				
			||||||
UPDATE options SET date_modified = strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified, 'unixepoch');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Event log
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `event_log_mig` (
 | 
					 | 
				
			||||||
  `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
					 | 
				
			||||||
  `note_id`	TEXT,
 | 
					 | 
				
			||||||
  `comment`	TEXT,
 | 
					 | 
				
			||||||
  `date_added`	TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO event_log_mig (id, note_id, comment, date_added)
 | 
					 | 
				
			||||||
                    SELECT id, note_id, comment, strftime('%Y-%m-%dT%H:%M:%S.000Z', date_added, 'unixepoch') FROM event_log;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE event_log;
 | 
					 | 
				
			||||||
ALTER TABLE event_log_mig RENAME TO event_log;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_event_log_date_added` ON `event_log` (
 | 
					 | 
				
			||||||
  `date_added`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Notes
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE IF NOT EXISTS "notes_mig" (
 | 
					 | 
				
			||||||
  `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_title`	TEXT,
 | 
					 | 
				
			||||||
  `note_text`	TEXT,
 | 
					 | 
				
			||||||
  `is_protected`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `is_deleted`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `date_created`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_modified`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  PRIMARY KEY(`note_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_mig (note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified)
 | 
					 | 
				
			||||||
                SELECT note_id, note_title, note_text, is_protected, is_deleted,
 | 
					 | 
				
			||||||
                  strftime('%Y-%m-%dT%H:%M:%S.000Z', date_created, 'unixepoch'),
 | 
					 | 
				
			||||||
                  strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified, 'unixepoch')
 | 
					 | 
				
			||||||
                FROM notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes;
 | 
					 | 
				
			||||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_is_deleted` ON `notes` (
 | 
					 | 
				
			||||||
  `is_deleted`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- note history
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE IF NOT EXISTS "notes_history_mig" (
 | 
					 | 
				
			||||||
  `note_history_id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
  `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_title`	TEXT,
 | 
					 | 
				
			||||||
  `note_text`	TEXT,
 | 
					 | 
				
			||||||
  `is_protected`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `date_modified_from` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_modified_to` TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to)
 | 
					 | 
				
			||||||
  SELECT note_history_id, note_id, note_title, note_text, is_protected,
 | 
					 | 
				
			||||||
    strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified_from, 'unixepoch'),
 | 
					 | 
				
			||||||
    strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified_to, 'unixepoch')
 | 
					 | 
				
			||||||
  FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
					 | 
				
			||||||
  `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` (
 | 
					 | 
				
			||||||
  `date_modified_from`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` (
 | 
					 | 
				
			||||||
  `date_modified_to`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Source IDs
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE source_ids;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `source_ids` (
 | 
					 | 
				
			||||||
  `source_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_created`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  PRIMARY KEY(`source_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Recent notes
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE recent_notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
  `note_tree_id` TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
  `note_path` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_accessed` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  is_deleted INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- Notes tree
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE IF NOT EXISTS "notes_tree_mig" (
 | 
					 | 
				
			||||||
  `note_tree_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_pid`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_pos`	INTEGER NOT NULL,
 | 
					 | 
				
			||||||
  `prefix`	TEXT,
 | 
					 | 
				
			||||||
  `is_expanded`	BOOLEAN,
 | 
					 | 
				
			||||||
  `is_deleted`	INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `date_modified`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  PRIMARY KEY(`note_tree_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_tree_mig (note_tree_id, note_id, note_pid, note_pos, prefix, is_expanded, is_deleted, date_modified)
 | 
					 | 
				
			||||||
                     SELECT note_tree_id, note_id, note_pid, note_pos, prefix, is_expanded, is_deleted,
 | 
					 | 
				
			||||||
                            strftime('%Y-%m-%dT%H:%M:%S.000Z', date_modified, 'unixepoch')
 | 
					 | 
				
			||||||
                     FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_tree;
 | 
					 | 
				
			||||||
ALTER TABLE notes_tree_mig RENAME TO notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_tree_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id_note_pid` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`,
 | 
					 | 
				
			||||||
  `note_pid`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
DROP index IDX_notes_tree_note_tree_id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
 | 
					 | 
				
			||||||
  SELECT 'notes', note_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
 | 
					 | 
				
			||||||
  SELECT 'notes_tree', note_tree_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
 | 
					 | 
				
			||||||
  SELECT 'notes_history', note_history_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_history;
 | 
					 | 
				
			||||||
@@ -1,18 +0,0 @@
 | 
				
			|||||||
delete from notes where note_id in ('FfZylYxt','HqzAEsR2fFEZ','KgTQDh67+1Mh','TKMbAYl0AFyQ','W+bGM185c6gw',
 | 
					 | 
				
			||||||
                                    'YXBdhv4dYKMy','aF4/6p1zTpIS','nsLnrrDktl/s','wkhFImoPuxky');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
delete from notes_tree where note_tree_id in ('TTy5N2y2S6JP','TTkL3rWDexpp','TTEhtomZekUk','TTvP7zW01zwg','TTuYmMTZyKRt'
 | 
					 | 
				
			||||||
  ,'TToaClamxbBF','TTKvNCe5X2dj','TTE7jFx5A0zW','TTc79bscyrHX','TTcw8ZyDy2Cc','TTdFzAOWA9hZ','TTUyVLqyIvVg','TTy85NKSBDyO'
 | 
					 | 
				
			||||||
  ,'TTCyuireAWBv','TTDpVyuzbj1a','TTYznrYvAeIs','TTocvv15VMyu','TTjtxQkBT5vj','TToyyRzbBF0T','TTFt8NE9vSyZ','TTfzFZOuuDqv'
 | 
					 | 
				
			||||||
  ,'TT2e2oUYcxG6','TToXselUpPAy','TTEM68gGukg0','TTkZxxwtUOzW','TTAZNxBtgmmh','TTK1YErdBE3x','TTzjKiEf54o6','TTPWd5Ou1xET'
 | 
					 | 
				
			||||||
  ,'TTxQtjf22rTL','TTJAGaI4c89V','TTUQmsxSTdV3','TTGAOf5Lvr6b','TTECSDRN4ZPW','TTZZXLiGNWv4','TTxSLphulRct','TT8vld7x0qWF'
 | 
					 | 
				
			||||||
  ,'TTuuxXnv2Kpw','TT3RkLZ9AI6t','TTuEbI4Cj3qC','TT4CXXRyWRqm','TTQCuFgnMqxX','TTxnDEMz1bd4','TTMOnqhBesjs','TTHblx55gRHN'
 | 
					 | 
				
			||||||
  ,'TTMHW8HIGCjR','TTxzg3qqyLjw','TTluvD7yS8Rv','TT88qK2j3ggk','TTF7oHhS5ANF','TTOH275JiUSy','TToIt2dQ5tYH','TTBPgixQgbAq'
 | 
					 | 
				
			||||||
  ,'TTeN46707CJl','TTDb3GC2y6nN','TTlIXFwpICko','TTE6M9AxLh2U','TTjqhB8zXjD6','TT9NPeLg4FjK','TTj12jDX7TM3','TTPRjf7EdvDX'
 | 
					 | 
				
			||||||
  ,'TTBnu09pxOmn','TTZxyAkJQ9Cf','TTlvqeof2IBS','TT5R5xtIqRQf','TTiiD6hFjlVH','TTNVjGHSqNgo','TTrORSHCsAVQ','TT5Ei5fngqkv'
 | 
					 | 
				
			||||||
  ,'TTQ4hdpcIX3C','TTQgxq4CoiHU','TTJayLjI6BSE','TTYyraNy0CVT','TTnAJ3AK3wHz','TTJwKcgs1s0X','TT4FiatgbLEs','TTEdp5Zx1n5F');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
update notes_tree set is_deleted = 1 where note_tree_id in ('TTiaU9xqnrca','TTQAy9c1vDId','TTHXWBJB2Y24','TTDV8DUK2IZA'
 | 
					 | 
				
			||||||
  ,'TTI5JHODZYV5','TTBEZ8TMSJV4','TT1MDWZXE8ZI','TTJV7ZOA8907','TTUGE6N99QSO','TTN0OS17T0KM');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
delete from notes_history where note_history_id in ('KHAp5viTrrOfugzQ', 'xmhaS76piZn0QGzn', '25aL96ke8xmud9Bt');
 | 
					 | 
				
			||||||
@@ -1,3 +0,0 @@
 | 
				
			|||||||
DELETE FROM notes_tree WHERE note_tree_id IN ('cb94QGgnCwOD', 'c3FWKhcVYyaQ');
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DELETE FROM notes_history WHERE note_history_id IN ('cdUD6ycs3l9h', 'OW4uh0HLtXaw');
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
UPDATE options SET opt_value = (SELECT MAX(id) FROM sync) WHERE opt_name = 'last_synced_push';
 | 
					 | 
				
			||||||
@@ -1,13 +0,0 @@
 | 
				
			|||||||
DELETE FROM recent_notes;
 | 
					 | 
				
			||||||
DELETE FROM sync;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
 | 
					 | 
				
			||||||
  SELECT 'notes', note_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
 | 
					 | 
				
			||||||
  SELECT 'notes_tree', note_tree_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT OR IGNORE INTO sync (entity_name, entity_id, sync_date, source_id)
 | 
					 | 
				
			||||||
  SELECT 'notes_history', note_history_id, strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), 'IMPORT' FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
UPDATE options SET opt_value = (SELECT MAX(id) FROM sync) WHERE opt_name IN ('last_synced_push', 'last_synced_pull');
 | 
					 | 
				
			||||||
@@ -1,101 +0,0 @@
 | 
				
			|||||||
INSERT INTO notes (note_id, note_title, note_text, date_created, date_modified)
 | 
					 | 
				
			||||||
    VALUES ('root', 'root', 'root', strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'), strftime('%Y-%m-%dT%H:%M:%S.000Z', 'now'));
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE IF NOT EXISTS "notes_mig" (
 | 
					 | 
				
			||||||
    `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `note_title`	TEXT,
 | 
					 | 
				
			||||||
    `note_text`	TEXT,
 | 
					 | 
				
			||||||
    `is_protected`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
    `is_deleted`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
    `date_created`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `date_modified`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    PRIMARY KEY(`note_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_mig (note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified)
 | 
					 | 
				
			||||||
    SELECT note_id, note_title, note_text, is_protected, is_deleted, date_created, date_modified FROM notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes;
 | 
					 | 
				
			||||||
ALTER TABLE notes_mig RENAME TO notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_is_deleted` ON `notes` (
 | 
					 | 
				
			||||||
    `is_deleted`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE IF NOT EXISTS "notes_tree_mig" (
 | 
					 | 
				
			||||||
    `note_tree_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `parent_note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `note_position`	INTEGER NOT NULL,
 | 
					 | 
				
			||||||
    `prefix`	TEXT,
 | 
					 | 
				
			||||||
    `is_expanded`	BOOLEAN,
 | 
					 | 
				
			||||||
    `is_deleted`	INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
    `date_modified`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    FOREIGN KEY(note_id) REFERENCES notes(note_id),
 | 
					 | 
				
			||||||
    FOREIGN KEY(parent_note_id) REFERENCES notes(note_id),
 | 
					 | 
				
			||||||
    PRIMARY KEY(`note_tree_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_tree_mig (note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified)
 | 
					 | 
				
			||||||
    SELECT note_tree_id, note_id, note_pid, note_pos, prefix, is_expanded, is_deleted, date_modified FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_tree;
 | 
					 | 
				
			||||||
ALTER TABLE notes_tree_mig RENAME TO notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
    `note_tree_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
    `note_id`,
 | 
					 | 
				
			||||||
    `parent_note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
    `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE IF NOT EXISTS "notes_history_mig" (
 | 
					 | 
				
			||||||
    `note_history_id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
    `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `note_title`	TEXT,
 | 
					 | 
				
			||||||
    `note_text`	TEXT,
 | 
					 | 
				
			||||||
    `is_protected`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
    `date_modified_from` TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `date_modified_to` TEXT NOT NULL,
 | 
					 | 
				
			||||||
    FOREIGN KEY(note_id) REFERENCES notes(note_id)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to)
 | 
					 | 
				
			||||||
    SELECT note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
					 | 
				
			||||||
    `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` (
 | 
					 | 
				
			||||||
    `date_modified_from`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` (
 | 
					 | 
				
			||||||
    `date_modified_to`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE recent_notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
    `note_tree_id` TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
    `note_path` TEXT NOT NULL,
 | 
					 | 
				
			||||||
    `date_accessed` TEXT NOT NULL,
 | 
					 | 
				
			||||||
    is_deleted INT,
 | 
					 | 
				
			||||||
    FOREIGN KEY(note_tree_id) REFERENCES notes_tree(note_tree_id)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE event_log;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `event_log` (
 | 
					 | 
				
			||||||
    `id`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
 | 
					 | 
				
			||||||
    `note_id`	TEXT,
 | 
					 | 
				
			||||||
    `comment`	TEXT,
 | 
					 | 
				
			||||||
    `date_added`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
    FOREIGN KEY(note_id) REFERENCES notes(note_id)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,29 +0,0 @@
 | 
				
			|||||||
CREATE TABLE IF NOT EXISTS "notes_tree_mig" (
 | 
					 | 
				
			||||||
  `note_tree_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `parent_note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_position`	INTEGER NOT NULL,
 | 
					 | 
				
			||||||
  `prefix`	TEXT,
 | 
					 | 
				
			||||||
  `is_expanded`	BOOLEAN,
 | 
					 | 
				
			||||||
  `is_deleted`	INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `date_modified`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  FOREIGN KEY(note_id) REFERENCES notes(note_id),
 | 
					 | 
				
			||||||
  PRIMARY KEY(`note_tree_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_tree_mig (note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified)
 | 
					 | 
				
			||||||
  SELECT note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_tree;
 | 
					 | 
				
			||||||
ALTER TABLE notes_tree_mig RENAME TO notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_tree_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`,
 | 
					 | 
				
			||||||
  `parent_note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,28 +0,0 @@
 | 
				
			|||||||
CREATE TABLE IF NOT EXISTS "notes_tree_mig" (
 | 
					 | 
				
			||||||
  `note_tree_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `parent_note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_position`	INTEGER NOT NULL,
 | 
					 | 
				
			||||||
  `prefix`	TEXT,
 | 
					 | 
				
			||||||
  `is_expanded`	BOOLEAN,
 | 
					 | 
				
			||||||
  `is_deleted`	INTEGER NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `date_modified`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  PRIMARY KEY(`note_tree_id`)
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_tree_mig (note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified)
 | 
					 | 
				
			||||||
  SELECT note_tree_id, note_id, parent_note_id, note_position, prefix, is_expanded, is_deleted, date_modified FROM notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_tree;
 | 
					 | 
				
			||||||
ALTER TABLE notes_tree_mig RENAME TO notes_tree;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_tree_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_tree_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`,
 | 
					 | 
				
			||||||
  `parent_note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,34 +0,0 @@
 | 
				
			|||||||
CREATE TABLE IF NOT EXISTS "notes_history_mig" (
 | 
					 | 
				
			||||||
  `note_history_id`	TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
  `note_id`	TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `note_title`	TEXT,
 | 
					 | 
				
			||||||
  `note_text`	TEXT,
 | 
					 | 
				
			||||||
  `is_protected`	INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  `date_modified_from` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_modified_to` TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
INSERT INTO notes_history_mig (note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to)
 | 
					 | 
				
			||||||
  SELECT note_history_id, note_id, note_title, note_text, is_protected, date_modified_from, date_modified_to FROM notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE notes_history;
 | 
					 | 
				
			||||||
ALTER TABLE notes_history_mig RENAME TO notes_history;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_id` ON `notes_history` (
 | 
					 | 
				
			||||||
  `note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_from` ON `notes_history` (
 | 
					 | 
				
			||||||
  `date_modified_from`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_history_note_date_modified_to` ON `notes_history` (
 | 
					 | 
				
			||||||
  `date_modified_to`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
DROP TABLE recent_notes;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE `recent_notes` (
 | 
					 | 
				
			||||||
  `note_tree_id` TEXT NOT NULL PRIMARY KEY,
 | 
					 | 
				
			||||||
  `note_path` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  `date_accessed` TEXT NOT NULL,
 | 
					 | 
				
			||||||
  is_deleted INT
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
DROP INDEX IDX_notes_tree_note_id_parent_note_id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE UNIQUE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`,
 | 
					 | 
				
			||||||
  `parent_note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
DROP INDEX IDX_notes_tree_note_id_parent_note_id;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX `IDX_notes_tree_note_id_parent_note_id` ON `notes_tree` (
 | 
					 | 
				
			||||||
  `note_id`,
 | 
					 | 
				
			||||||
  `parent_note_id`
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
-- dropping this as it's just duplicate of primary key
 | 
					 | 
				
			||||||
DROP INDEX IDX_notes_tree_note_tree_id;
 | 
					 | 
				
			||||||
@@ -1,11 +0,0 @@
 | 
				
			|||||||
CREATE TABLE images
 | 
					 | 
				
			||||||
(
 | 
					 | 
				
			||||||
  image_id TEXT PRIMARY KEY NOT NULL,
 | 
					 | 
				
			||||||
  format TEXT NOT NULL,
 | 
					 | 
				
			||||||
  checksum TEXT NOT NULL,
 | 
					 | 
				
			||||||
  name TEXT NOT NULL,
 | 
					 | 
				
			||||||
  data BLOB,
 | 
					 | 
				
			||||||
  is_deleted INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  date_modified TEXT NOT NULL,
 | 
					 | 
				
			||||||
  date_created TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
@@ -1,16 +0,0 @@
 | 
				
			|||||||
DROP TABLE images;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE images
 | 
					 | 
				
			||||||
(
 | 
					 | 
				
			||||||
  image_id TEXT PRIMARY KEY NOT NULL,
 | 
					 | 
				
			||||||
  note_id TEXT NOT NULL,
 | 
					 | 
				
			||||||
  format TEXT NOT NULL,
 | 
					 | 
				
			||||||
  checksum TEXT NOT NULL,
 | 
					 | 
				
			||||||
  name TEXT NOT NULL,
 | 
					 | 
				
			||||||
  data BLOB,
 | 
					 | 
				
			||||||
  is_deleted INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  date_modified TEXT NOT NULL,
 | 
					 | 
				
			||||||
  date_created TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX images_note_id_index ON images (note_id);
 | 
					 | 
				
			||||||
@@ -1,27 +0,0 @@
 | 
				
			|||||||
DROP TABLE images;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE images
 | 
					 | 
				
			||||||
(
 | 
					 | 
				
			||||||
  image_id TEXT PRIMARY KEY NOT NULL,
 | 
					 | 
				
			||||||
  format TEXT NOT NULL,
 | 
					 | 
				
			||||||
  checksum TEXT NOT NULL,
 | 
					 | 
				
			||||||
  name TEXT NOT NULL,
 | 
					 | 
				
			||||||
  data BLOB,
 | 
					 | 
				
			||||||
  is_deleted INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  date_modified TEXT NOT NULL,
 | 
					 | 
				
			||||||
  date_created TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE TABLE notes_image
 | 
					 | 
				
			||||||
(
 | 
					 | 
				
			||||||
  note_image_id TEXT PRIMARY KEY NOT NULL,
 | 
					 | 
				
			||||||
  note_id TEXT NOT NULL,
 | 
					 | 
				
			||||||
  image_id TEXT NOT NULL,
 | 
					 | 
				
			||||||
  is_deleted INT NOT NULL DEFAULT 0,
 | 
					 | 
				
			||||||
  date_modified TEXT NOT NULL,
 | 
					 | 
				
			||||||
  date_created TEXT NOT NULL
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
CREATE INDEX notes_image_note_id_index ON notes_image (note_id);
 | 
					 | 
				
			||||||
CREATE INDEX notes_image_image_id_index ON notes_image (image_id);
 | 
					 | 
				
			||||||
CREATE INDEX notes_image_note_id_image_id_index ON notes_image (note_id, image_id);
 | 
					 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user