photostructure 0.6.0-alpha.2 → 2026.4.7-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. package/LICENSE.md +31 -29
  2. package/README.md +20 -8
  3. package/SECURITY.md +29 -0
  4. package/VERSION.json +12 -0
  5. package/bin/bootstrap.js +9 -0
  6. package/bin/fix.js +9 -0
  7. package/bin/info.js +9 -0
  8. package/bin/list.js +9 -0
  9. package/bin/logcat.js +9 -0
  10. package/bin/logtail.js +9 -0
  11. package/bin/main.js +9 -0
  12. package/bin/photostructure.js +9 -0
  13. package/bin/sync.js +9 -0
  14. package/bin/web.js +9 -0
  15. package/bin/worker.js +9 -0
  16. package/data/cuss.txt.br +0 -0
  17. package/data/icc/AdobeCompat-v2.icc +0 -0
  18. package/data/icc/AppleCompat-v2.icc +0 -0
  19. package/data/icc/ColorMatchCompat-v2.icc +0 -0
  20. package/data/icc/DisplayP3-v2-magic.icc +0 -0
  21. package/data/icc/DisplayP3-v2-micro.icc +0 -0
  22. package/data/icc/DisplayP3-v4.icc +0 -0
  23. package/data/icc/DisplayP3Compat-v2-magic.icc +0 -0
  24. package/data/icc/DisplayP3Compat-v2-micro.icc +0 -0
  25. package/data/icc/DisplayP3Compat-v4.icc +0 -0
  26. package/data/icc/ProPhoto-v2-magic.icc +0 -0
  27. package/data/icc/ProPhoto-v2-micro.icc +0 -0
  28. package/data/icc/ProPhoto-v4.icc +0 -0
  29. package/data/icc/Rec2020-v2-magic.icc +0 -0
  30. package/data/icc/Rec2020-v2-micro.icc +0 -0
  31. package/data/icc/Rec2020-v4.icc +0 -0
  32. package/data/icc/Rec2020Compat-v2-magic.icc +0 -0
  33. package/data/icc/Rec2020Compat-v2-micro.icc +0 -0
  34. package/data/icc/Rec2020Compat-v4.icc +0 -0
  35. package/data/icc/Rec709-v2-magic.icc +0 -0
  36. package/data/icc/Rec709-v2-micro.icc +0 -0
  37. package/data/icc/Rec709-v4.icc +0 -0
  38. package/data/icc/WideGamutCompat-v2.icc +0 -0
  39. package/data/icc/_info.md +49 -0
  40. package/data/icc/license +116 -0
  41. package/data/icc/readme.md +142 -0
  42. package/data/icc/sGrey-v2-magic.icc +0 -0
  43. package/data/icc/sGrey-v2-micro.icc +0 -0
  44. package/data/icc/sGrey-v2-nano.icc +0 -0
  45. package/data/icc/sGrey-v4.icc +0 -0
  46. package/data/icc/sRGB-v2-magic.icc +0 -0
  47. package/data/icc/sRGB-v2-micro.icc +0 -0
  48. package/data/icc/sRGB-v2-nano.icc +0 -0
  49. package/data/icc/sRGB-v4.icc +0 -0
  50. package/data/icc/scRGB-v2.icc +0 -0
  51. package/data/migrations/models/20181030_models.sql +151 -0
  52. package/data/migrations/models/20190417_rotation.sql +2 -0
  53. package/data/migrations/models/20190425_merged_assets.sql +11 -0
  54. package/{migrations → data/migrations}/models/20190426_clean_sha.sql +4 -4
  55. package/data/migrations/models/20190426_lowercase_psnet_hostname.sql +1 -0
  56. package/{migrations → data/migrations}/models/20190727_find_by_ca_and_geo.sql +3 -1
  57. package/data/migrations/models/20190730_session.sql +7 -0
  58. package/data/migrations/models/20190922_numeric_captured_at.sql +1 -0
  59. package/data/migrations/models/20190923_asset_file_v2_nofk.sql +107 -0
  60. package/data/migrations/models/20191013_asset_v2_nofk.sql +81 -0
  61. package/data/migrations/models/20200104_video_duration.sql +9 -0
  62. package/data/migrations/models/20200116_heartbeat.sql +9 -0
  63. package/data/migrations/models/20200127_spread_modes.sql +1 -0
  64. package/data/migrations/models/20200128_asset_file_v3_nofk.sql +143 -0
  65. package/data/migrations/models/20200130_advisory_lock.sql +21 -0
  66. package/data/migrations/models/20200211_updateCount.sql +2 -0
  67. package/data/migrations/models/20200512_asset_file_v4_nofk.sql +145 -0
  68. package/data/migrations/models/20200515_drop_merged_asset.sql +1 -0
  69. package/data/migrations/models/20200816_normalize_asset_file_uris.sql +1 -0
  70. package/data/migrations/models/20200823_add_asset_excluded.sql +11 -0
  71. package/data/migrations/models/20200825_fix_root_tags.sql +1 -0
  72. package/data/migrations/models/20200826_dedupe_tag_paths.sql +1 -0
  73. package/data/migrations/models/20200827_tag_v2_nofk.sql +35 -0
  74. package/data/migrations/models/20200923_suffix_tag_paths.sql +1 -0
  75. package/data/migrations/models/20200927_progress_v2.sql +23 -0
  76. package/data/migrations/models/20201006_progress_meta.sql +16 -0
  77. package/data/migrations/models/20201007_operation.sql +12 -0
  78. package/data/migrations/models/20201023_dedupe_tag_paths.sql +1 -0
  79. package/data/migrations/models/20201026_normalize_asset_file_uris.sql +1 -0
  80. package/data/migrations/models/20201030_add_tag_counts.sql +5 -0
  81. package/data/migrations/models/20201106_normalize_tag_paths.sql +1 -0
  82. package/data/migrations/models/20201112_tag_display_name.sql +2 -0
  83. package/data/migrations/models/20201113_drop_tc_tables.sql +1 -0
  84. package/data/migrations/models/20201211_tag_description.sql +5 -0
  85. package/data/migrations/models/20210322_sha_blocklist.sql +6 -0
  86. package/data/migrations/models/20210323_create_tag_fts.sql +1 -0
  87. package/data/migrations/models/20210324_asset_fave_delete.sql +20 -0
  88. package/data/migrations/models/20210531_asset_duration.sql +20 -0
  89. package/data/migrations/models/20210604_changed_tag.sql +7 -0
  90. package/data/migrations/models/20210627_changed_tag_updated_at.sql +2 -0
  91. package/data/migrations/models/20210827_asset_excluded_at.sql +19 -0
  92. package/data/migrations/models/20210930_asset_file_rating.sql +2 -0
  93. package/data/migrations/models/20210930_asset_revision.sql +16 -0
  94. package/data/migrations/models/20211025_ts_cleanup.sql +11 -0
  95. package/data/migrations/models/20220222_rebuild_rotated_heic.sql +2 -0
  96. package/data/migrations/models/20220922_rebuild_videos.sql +3 -0
  97. package/data/migrations/models/20220923_add_asset_file_mode_pct.sql +63 -0
  98. package/data/migrations/models/20221031_add_asset_file_hashes.sql +5 -0
  99. package/data/migrations/models/20231105_copy_asset_duration.sql +3 -0
  100. package/data/migrations/models/20231115_strict_nofk.sql +674 -0
  101. package/data/migrations/models/20231116_rebuild_tag_asset_counts.sql +1 -0
  102. package/data/migrations/models/20240115_task.sql +18 -0
  103. package/data/migrations/models/20240131_drop_operation_version.sql +35 -0
  104. package/data/migrations/models/20240201_create_tag_fts.sql +1 -0
  105. package/data/migrations/models/20240307_rebuild_progress_nofk.sql +59 -0
  106. package/data/migrations/models/20240313_rebuild_null_island.sql +3 -0
  107. package/data/migrations/models/20240723_add_asset_file_image_data_hash.sql +2 -0
  108. package/data/migrations/models/20240920_drop_task.sql +1 -0
  109. package/data/migrations/models/20240929_metadata_local.sql +3 -0
  110. package/data/migrations/models/20250421_asset_tag_fk_indexes.sql +21 -0
  111. package/data/migrations/models/20250421_tag_hierarchy.sql +13 -0
  112. package/data/migrations/models/20250422_schema_v3.sql +170 -0
  113. package/data/migrations/models/20250423_schema_v3_backfill_nofk.sql +1 -0
  114. package/data/migrations/models/20250929_indexes.sql +80 -0
  115. package/data/migrations/models/20260117_scan_generation.sql +31 -0
  116. package/data/migrations/models/20260122_fix_scan_generation_idx.sql +5 -0
  117. package/data/migrations/models/20260204_vec0_captured_at_local.sql +10 -0
  118. package/data/migrations/models/20260217_reaggregate_to_validate_siblings.sql +8 -0
  119. package/data/migrations/models/20260321_captured_at_src_detail.sql +3 -0
  120. package/data/migrations/models/20260322_captured_at_src_backfill.sql +2 -0
  121. package/data/migrations/models/20260403_drop_tag_fts.sql +5 -0
  122. package/data/migrations/models/20260425_volume_label.sql +5 -0
  123. package/data/migrations/models/20260426_vec0_bname.sql +6 -0
  124. package/data/models-schema.json +907 -0
  125. package/data/models-schema.sql +268 -0
  126. package/data/words.txt.br +0 -0
  127. package/defaults.env +6376 -0
  128. package/package.json +47 -25
  129. package/photostructure +26 -27
  130. package/public/192.png.gz +0 -0
  131. package/public/3rd-party-licenses.html.gz +0 -0
  132. package/public/3rd-party-licenses.txt.gz +0 -0
  133. package/public/512.png.gz +0 -0
  134. package/public/app/Array.js +8 -0
  135. package/public/app/Array.js.gz +0 -0
  136. package/public/app/BabyMarkdown.js +14 -0
  137. package/public/app/BabyMarkdown.js.gz +0 -0
  138. package/public/app/DropDown.vue_vue_type_script_setup_true_lang.js +12 -0
  139. package/public/app/DropDown.vue_vue_type_script_setup_true_lang.js.gz +0 -0
  140. package/public/app/HealthChecks.js +8 -0
  141. package/public/app/HealthChecks.js.gz +0 -0
  142. package/public/app/Lazy.js +8 -0
  143. package/public/app/Lazy.js.gz +0 -0
  144. package/public/app/PageActionsMenu.vue_vue_type_script_setup_true_lang.js +8 -0
  145. package/public/app/PageActionsMenu.vue_vue_type_script_setup_true_lang.js.gz +0 -0
  146. package/public/app/ProgressState.js +8 -0
  147. package/public/app/Random.js +8 -0
  148. package/public/app/SSEChannels.js +8 -0
  149. package/public/app/SSEChannels.js.gz +0 -0
  150. package/public/app/Search.js +8 -0
  151. package/public/app/Search.js.gz +0 -0
  152. package/public/app/StickyHeader.js +8 -0
  153. package/public/app/StickyHeader.js.gz +0 -0
  154. package/public/app/Tag.js +8 -0
  155. package/public/app/Tag.js.gz +0 -0
  156. package/public/app/_plugin-vue_export-helper.js +8 -0
  157. package/public/app/_plugin-vue_export-helper.js.gz +0 -0
  158. package/public/app/about.css +8 -0
  159. package/public/app/about.css.gz +0 -0
  160. package/public/app/about.js +8 -0
  161. package/public/app/about.js.gz +0 -0
  162. package/public/app/app.css +8 -0
  163. package/public/app/app.css.gz +0 -0
  164. package/public/app/app.js +12 -0
  165. package/public/app/app.js.gz +0 -0
  166. package/public/app/health.css +8 -0
  167. package/public/app/health.css.gz +0 -0
  168. package/public/app/health.js +10 -0
  169. package/public/app/health.js.gz +0 -0
  170. package/public/app/logs.css +8 -0
  171. package/public/app/logs.css.gz +0 -0
  172. package/public/app/logs.js +8 -0
  173. package/public/app/logs.js.gz +0 -0
  174. package/public/app/onReady.js +8 -0
  175. package/public/app/platform.js +8 -0
  176. package/public/app/roboto-mono-v22-latin-700.woff2.gz +0 -0
  177. package/public/app/roboto-mono-v22-latin-regular.woff2.gz +0 -0
  178. package/public/app/roboto-v30-latin-700.woff2.gz +0 -0
  179. package/public/app/roboto-v30-latin-700italic.woff2.gz +0 -0
  180. package/public/app/roboto-v30-latin-italic.woff2.gz +0 -0
  181. package/public/app/roboto-v30-latin-regular.woff2.gz +0 -0
  182. package/public/app/settings.css +8 -0
  183. package/public/app/settings.css.gz +0 -0
  184. package/public/app/settings.js +8 -0
  185. package/public/app/settings.js.gz +0 -0
  186. package/public/app/splash.css +8 -0
  187. package/public/app/splash.css.gz +0 -0
  188. package/public/app/splash.js +8 -0
  189. package/public/app/splash.js.gz +0 -0
  190. package/public/app/sse-worker.js +8 -0
  191. package/public/app/sse-worker.js.gz +0 -0
  192. package/public/app/sync.css +8 -0
  193. package/public/app/sync.css.gz +0 -0
  194. package/public/app/sync.js +12 -0
  195. package/public/app/sync.js.gz +0 -0
  196. package/public/app/toast.js +9 -0
  197. package/public/app/toast.js.gz +0 -0
  198. package/public/app/useAnchorHighlight.js +8 -0
  199. package/public/app/useSectionPersistence.js +8 -0
  200. package/public/app/useSectionPersistence.js.gz +0 -0
  201. package/public/apple-touch-icon.png.gz +0 -0
  202. package/public/browserconfig.xml +9 -0
  203. package/public/eula.html +25 -26
  204. package/public/favicon-16x16.png.gz +0 -0
  205. package/public/favicon-32x32.png.gz +0 -0
  206. package/public/favicon.ico +0 -0
  207. package/public/fonts/roboto-mono-v22-latin-700.woff2.gz +0 -0
  208. package/public/fonts/roboto-mono-v22-latin-regular.woff2.gz +0 -0
  209. package/public/fonts/roboto-v30-latin-700.woff2.gz +0 -0
  210. package/public/fonts/roboto-v30-latin-700italic.woff2.gz +0 -0
  211. package/public/fonts/roboto-v30-latin-italic.woff2.gz +0 -0
  212. package/public/fonts/roboto-v30-latin-regular.woff2.gz +0 -0
  213. package/public/icon.svg.gz +0 -0
  214. package/public/images/1.png.gz +0 -0
  215. package/public/images/128.png +0 -0
  216. package/public/images/22-Template.png.gz +0 -0
  217. package/public/images/22-Template@2x.png.gz +0 -0
  218. package/public/images/22-Template@3x.png.gz +0 -0
  219. package/public/images/22-blue.png.gz +0 -0
  220. package/public/images/22-blue@2x.png.gz +0 -0
  221. package/public/images/22-blue@3x.png.gz +0 -0
  222. package/public/images/22-dark.png +0 -0
  223. package/public/images/22-dark@2x.png +0 -0
  224. package/public/images/22-dark@3x.png +0 -0
  225. package/public/images/22-gradient.png.gz +0 -0
  226. package/public/images/22-gradient@2x.png.gz +0 -0
  227. package/public/images/22-gradient@3x.png.gz +0 -0
  228. package/public/images/22-light.png +0 -0
  229. package/public/images/22-light@2x.png +0 -0
  230. package/public/images/22-light@3x.png +0 -0
  231. package/public/images/256.png +0 -0
  232. package/public/images/512.png.gz +0 -0
  233. package/public/images/64.png +0 -0
  234. package/public/images/antenna.svg.gz +0 -0
  235. package/public/images/article.svg.gz +0 -0
  236. package/public/images/baby.svg.gz +0 -0
  237. package/public/images/ballot-box.svg.gz +0 -0
  238. package/public/images/bank.svg.gz +0 -0
  239. package/public/images/bar-chart.svg.gz +0 -0
  240. package/public/images/beetle.svg.gz +0 -0
  241. package/public/images/birthday.svg.gz +0 -0
  242. package/public/images/bookmark-tabs.svg.gz +0 -0
  243. package/public/images/books-desat.svg.gz +0 -0
  244. package/public/images/books.svg.gz +0 -0
  245. package/public/images/busy-circle.svg.gz +0 -0
  246. package/public/images/busy-circles.svg.gz +0 -0
  247. package/public/images/busy-dots.svg.gz +0 -0
  248. package/public/images/busy.svg.gz +0 -0
  249. package/public/images/calendar.svg.gz +0 -0
  250. package/public/images/camera.svg.gz +0 -0
  251. package/public/images/card-box.svg.gz +0 -0
  252. package/public/images/card-index-dividers.svg.gz +0 -0
  253. package/public/images/cd.svg.gz +0 -0
  254. package/public/images/chart.svg.gz +0 -0
  255. package/public/images/check.svg.gz +0 -0
  256. package/public/images/checkered-flag.svg.gz +0 -0
  257. package/public/images/clear-256.png.gz +0 -0
  258. package/public/images/clear-64.png.gz +0 -0
  259. package/public/images/clock.svg.gz +0 -0
  260. package/public/images/computer.svg.gz +0 -0
  261. package/public/images/cpu.svg.gz +0 -0
  262. package/public/images/crane.svg.gz +0 -0
  263. package/public/images/cross-mark.svg.gz +0 -0
  264. package/public/images/disabled.svg.gz +0 -0
  265. package/public/images/dvd.svg.gz +0 -0
  266. package/public/images/emergency-light.svg.gz +0 -0
  267. package/public/images/error.svg.gz +0 -0
  268. package/public/images/expressionless-desat.svg.gz +0 -0
  269. package/public/images/expressionless.svg.gz +0 -0
  270. package/public/images/file-cabinet.svg.gz +0 -0
  271. package/public/images/fill.svg.gz +0 -0
  272. package/public/images/floppy.svg.gz +0 -0
  273. package/public/images/gift.svg.gz +0 -0
  274. package/public/images/green-check.svg.gz +0 -0
  275. package/public/images/green-radio.svg.gz +0 -0
  276. package/public/images/handshake.svg.gz +0 -0
  277. package/public/images/health.svg.gz +0 -0
  278. package/public/images/heart.svg.gz +0 -0
  279. package/public/images/home.svg.gz +0 -0
  280. package/public/images/homebrew-installer.png.gz +0 -0
  281. package/public/images/info.svg.gz +0 -0
  282. package/public/images/library.svg.gz +0 -0
  283. package/public/images/logo-blue.svg.gz +0 -0
  284. package/public/images/logo-circle.svg.gz +0 -0
  285. package/public/images/logo-dark-700pt.svg.gz +0 -0
  286. package/public/images/logo-dark.svg.gz +0 -0
  287. package/public/images/logo-gradient-gloss-512w.png.gz +0 -0
  288. package/public/images/logo-gradient-gloss.svg.gz +0 -0
  289. package/public/images/logo-gradient-square-512w.png.gz +0 -0
  290. package/public/images/logo-gradient.svg.gz +0 -0
  291. package/public/images/logo-horizontal-600w.png.gz +0 -0
  292. package/public/images/logo-horizontal-white.svg.gz +0 -0
  293. package/public/images/logo-horizontal.svg.gz +0 -0
  294. package/public/images/logo-lite.svg.gz +0 -0
  295. package/public/images/logo-plus-512w.png.gz +0 -0
  296. package/public/images/logo-plus-horizontal.svg.gz +0 -0
  297. package/public/images/logo-plus.svg.gz +0 -0
  298. package/public/images/logo-square.svg.gz +0 -0
  299. package/public/images/logo-white.svg.gz +0 -0
  300. package/public/images/logo.ico +0 -0
  301. package/public/images/logo.png +0 -0
  302. package/public/images/logo@2x.png.gz +0 -0
  303. package/public/images/logo@3x.png.gz +0 -0
  304. package/public/images/logo@4x.png.gz +0 -0
  305. package/public/images/logo@5x.png +0 -0
  306. package/public/images/maximize.svg.gz +0 -0
  307. package/public/images/microscope.svg.gz +0 -0
  308. package/public/images/minidisc.svg.gz +0 -0
  309. package/public/images/movie-camera.svg.gz +0 -0
  310. package/public/images/navigate_next.svg.gz +0 -0
  311. package/public/images/new-yellow.svg.gz +0 -0
  312. package/public/images/new.svg.gz +0 -0
  313. package/public/images/open-book.svg.gz +0 -0
  314. package/public/images/open-folder.svg.gz +0 -0
  315. package/public/images/pause.svg.gz +0 -0
  316. package/public/images/photostructure-black.svg.gz +0 -0
  317. package/public/images/photostructure-white.svg.gz +0 -0
  318. package/public/images/refresh.svg.gz +0 -0
  319. package/public/images/rocket.svg.gz +0 -0
  320. package/public/images/sad-cat.svg.gz +0 -0
  321. package/public/images/safe.svg.gz +0 -0
  322. package/public/images/scales.svg.gz +0 -0
  323. package/public/images/seedling.svg.gz +0 -0
  324. package/public/images/shield.svg.gz +0 -0
  325. package/public/images/sleeping-face-desat.svg.gz +0 -0
  326. package/public/images/sleeping-face.svg.gz +0 -0
  327. package/public/images/sparkles.svg.gz +0 -0
  328. package/public/images/speed.svg.gz +0 -0
  329. package/public/images/splash.svg +1 -1
  330. package/public/images/splashbg1-1024w.jpg +0 -0
  331. package/public/images/splashbg2-1024w.jpg +0 -0
  332. package/public/images/splashbg3-1024w.jpg +0 -0
  333. package/public/images/splashbg4-1024w.jpg +0 -0
  334. package/public/images/splashbg5-1024w.jpg +0 -0
  335. package/public/images/splashbg6-1024w.jpg +0 -0
  336. package/public/images/star2.svg.gz +0 -0
  337. package/public/images/starry-night.svg.gz +0 -0
  338. package/public/images/stethoscope.svg.gz +0 -0
  339. package/public/images/stop.svg.gz +0 -0
  340. package/public/images/surf.svg.gz +0 -0
  341. package/public/images/sync.svg.gz +0 -0
  342. package/public/images/tada.svg.gz +0 -0
  343. package/public/images/terminal.svg.gz +0 -0
  344. package/public/images/thinking.svg.gz +0 -0
  345. package/public/images/thumbs-down.svg.gz +0 -0
  346. package/public/images/thumbs-up.svg.gz +0 -0
  347. package/public/images/toolbox.svg.gz +0 -0
  348. package/public/images/tools.svg.gz +0 -0
  349. package/public/images/umbrella.svg.gz +0 -0
  350. package/public/images/warning.svg.gz +0 -0
  351. package/public/images/wave.svg.gz +0 -0
  352. package/public/images/wrench.svg.gz +0 -0
  353. package/public/images/xray.svg.gz +0 -0
  354. package/public/images/zzz.svg.gz +0 -0
  355. package/public/mstile-144x144.png.gz +0 -0
  356. package/public/mstile-150x150.png.gz +0 -0
  357. package/public/mstile-310x150.png.gz +0 -0
  358. package/public/mstile-310x310.png.gz +0 -0
  359. package/public/mstile-70x70.png.gz +0 -0
  360. package/public/safari-pinned-tab.svg.gz +0 -0
  361. package/public/sw.js +5 -0
  362. package/server/bin/install-codec-tools.sh +48 -0
  363. package/server/sudoers.d/photostructure-codec-install +18 -0
  364. package/tools/README.md +23 -0
  365. package/tools/build.sh +30 -0
  366. package/tools/download-rg.sh +61 -0
  367. package/tools/license-overrides/photostructure-sqlite-vec-MIT.txt +21 -0
  368. package/tools/licenses/d3-color-difference/LICENSE.txt +29 -0
  369. package/tools/licenses/deep-eql/LICENSE.txt +21 -0
  370. package/tools/licenses/exiftool/{license.txt → LICENSE.txt} +140 -140
  371. package/tools/licenses/fft.js/LICENSE.txt +9 -0
  372. package/tools/licenses/libjpeg-turbo/LICENSE.md +7 -16
  373. package/tools/licenses/libraw/COPYRIGHT.txt +27 -0
  374. package/tools/licenses/moveable-type/LICENSE.txt +6 -0
  375. package/tools/licenses/noto-emoji/LICENSE.txt +201 -0
  376. package/tools/licenses/sharp-phash/LICENSE.txt +21 -0
  377. package/tools/licenses/{twemoji → type-detect}/LICENSE.txt +1 -1
  378. package/tools/linux-arm64/dcraw_emu +0 -0
  379. package/tools/linux-arm64/jpegtran +0 -0
  380. package/tools/linux-arm64/raw-identify +0 -0
  381. package/tools/linux-arm64/rg +0 -0
  382. package/tools/linux-arm64/sqlite3 +0 -0
  383. package/tools/linux-x64/dcraw_emu +0 -0
  384. package/tools/linux-x64/jpegtran +0 -0
  385. package/tools/linux-x64/raw-identify +0 -0
  386. package/tools/linux-x64/rg +0 -0
  387. package/tools/linux-x64/sqlite3 +0 -0
  388. package/tools/mac-arm64/dcraw_emu +0 -0
  389. package/tools/mac-arm64/jpegtran +0 -0
  390. package/tools/mac-arm64/jpegtran-README.md +31 -0
  391. package/tools/mac-arm64/libraw-README.md +42 -0
  392. package/tools/mac-arm64/raw-identify +0 -0
  393. package/tools/mac-arm64/rg +0 -0
  394. package/tools/mac-arm64/sqlite3 +0 -0
  395. package/tools/mac-arm64/sqlite3-README.md +35 -0
  396. package/tools/mac-x64/dcraw_emu +0 -0
  397. package/tools/mac-x64/jpegtran +0 -0
  398. package/tools/mac-x64/jpegtran-README.md +30 -0
  399. package/tools/mac-x64/libraw-README.md +52 -0
  400. package/tools/mac-x64/raw-identify +0 -0
  401. package/tools/mac-x64/rg +0 -0
  402. package/tools/mac-x64/sqlite3 +0 -0
  403. package/tools/mac-x64/sqlite3-README.md +6 -0
  404. package/tools/win-x64/dcraw_emu.exe +0 -0
  405. package/tools/{win-ia32/jpegtran → win-x64}/jpegtran.exe +0 -0
  406. package/tools/{win-ia32/jpegtran → win-x64}/libjpeg-62.dll +0 -0
  407. package/tools/win-x64/libraw-README.md +6 -0
  408. package/tools/win-x64/libraw.dll +0 -0
  409. package/tools/win-x64/raw-identify.exe +0 -0
  410. package/tools/win-x64/recycle-bin-README.md +3 -0
  411. package/tools/win-x64/recycle-bin.exe +0 -0
  412. package/tools/win-x64/rg.exe +0 -0
  413. package/tools/win-x64/sqlite3-README.md +4 -0
  414. package/tools/win-x64/sqlite3.exe +0 -0
  415. package/views/_fouc-prevention.ejs +13 -0
  416. package/views/error.ejs +64 -0
  417. package/views/eula.html +57 -0
  418. package/views/settings.ejs +958 -0
  419. package/views/spa.ejs +54 -0
  420. package/views/splash.ejs +30 -0
  421. package/views/welcome-tools.ejs +201 -0
  422. package/views/welcome.ejs +89 -0
  423. package/app/info.js +0 -3
  424. package/app/logtail.js +0 -3
  425. package/app/main.js +0 -3
  426. package/app/sync-file.js +0 -3
  427. package/app/sync.js +0 -3
  428. package/app/web.js +0 -3
  429. package/migrations/models/20181030_models.sql +0 -145
  430. package/migrations/models/20190417_rotation.sql +0 -1
  431. package/migrations/models/20190425_merged_assets.sql +0 -10
  432. package/migrations/models/20190426_lowercase_psnet_hostname.sql +0 -1
  433. package/migrations/models/20190522_on_new_exif_uid.sql +0 -1
  434. package/migrations/models/20190729_on_new_exif_uid.sql +0 -1
  435. package/migrations/models/20190730_session.sql +0 -6
  436. package/migrations/stats/20181030_stats.sql +0 -16
  437. package/migrations/stats/20190312_files_not_bytes.sql +0 -23
  438. package/migrations/stats/20190515_rebuild_queue.sql +0 -21
  439. package/public/app/latest.js.gz +0 -0
  440. package/public/fonts/roboto-mono-v5-latin-regular.woff.gz +0 -0
  441. package/public/fonts/roboto-mono-v5-latin-regular.woff2.gz +0 -0
  442. package/public/fonts/roboto-v18-latin-300.woff.gz +0 -0
  443. package/public/fonts/roboto-v18-latin-300.woff2.gz +0 -0
  444. package/public/fonts/roboto-v18-latin-500.woff.gz +0 -0
  445. package/public/fonts/roboto-v18-latin-500.woff2.gz +0 -0
  446. package/public/fonts/roboto-v18-latin-700.woff.gz +0 -0
  447. package/public/fonts/roboto-v18-latin-700.woff2.gz +0 -0
  448. package/public/fonts/roboto-v18-latin-900.woff.gz +0 -0
  449. package/public/fonts/roboto-v18-latin-900.woff2.gz +0 -0
  450. package/public/fonts/roboto-v18-latin-italic.woff.gz +0 -0
  451. package/public/fonts/roboto-v18-latin-italic.woff2.gz +0 -0
  452. package/public/fonts/roboto-v18-latin-regular.woff.gz +0 -0
  453. package/public/fonts/roboto-v18-latin-regular.woff2.gz +0 -0
  454. package/public/images/128.png.gz +0 -0
  455. package/public/images/256-gradient.png +0 -0
  456. package/public/images/256-gradient.png.gz +0 -0
  457. package/public/images/256.png.gz +0 -0
  458. package/public/images/64.png.gz +0 -0
  459. package/public/images/bg.svg.gz +0 -0
  460. package/public/images/bg10.jpg.gz +0 -0
  461. package/public/images/blue-splash-1024w.png.gz +0 -0
  462. package/public/images/blue-tri-bg.svg.gz +0 -0
  463. package/public/images/boom.svg.gz +0 -0
  464. package/public/images/dark-cyan-fuschia-bg.svg.gz +0 -0
  465. package/public/images/fit.svg.gz +0 -0
  466. package/public/images/light-cyan-fuschia-bg.svg.gz +0 -0
  467. package/public/images/line-logo-top-cuts-filled.svg.gz +0 -0
  468. package/public/images/line-logo-top-cuts.svg.gz +0 -0
  469. package/public/images/link.svg.gz +0 -0
  470. package/public/images/logo-gradient-gloss-sq.svg.gz +0 -0
  471. package/public/images/logo-gradient.svg +0 -1
  472. package/public/images/logo-icon-path.svg.gz +0 -0
  473. package/public/images/logo-text-path.svg.gz +0 -0
  474. package/public/images/logo-text-white.svg.gz +0 -0
  475. package/public/images/navigate_prev.svg.gz +0 -0
  476. package/public/images/no-entry.svg.gz +0 -0
  477. package/public/images/phone.svg.gz +0 -0
  478. package/public/images/private.svg.gz +0 -0
  479. package/public/images/profile.svg.gz +0 -0
  480. package/public/images/public.svg.gz +0 -0
  481. package/public/images/show-in-folder-black.svg.gz +0 -0
  482. package/public/images/show-in-folder.svg.gz +0 -0
  483. package/public/images/shrug.svg.gz +0 -0
  484. package/public/images/splash-1024w.png +0 -0
  485. package/public/images/splash-1024w.png.gz +0 -0
  486. package/public/images/splash-512w.png +0 -0
  487. package/public/images/splash-512w.png.gz +0 -0
  488. package/public/images/splash-blue.svg +0 -1
  489. package/public/images/splashbg01-1024w.jpg +0 -0
  490. package/public/images/splashbg01-1024w.jpg.gz +0 -0
  491. package/public/images/splashbg02-1024w.jpg +0 -0
  492. package/public/images/splashbg02-1024w.jpg.gz +0 -0
  493. package/public/images/text-logo-blue.svg.gz +0 -0
  494. package/public/images/transparent-white.svg.gz +0 -0
  495. package/public/images/trash.svg.gz +0 -0
  496. package/public/release-notes.html +0 -581
  497. package/public/splash.html +0 -360
  498. package/tools/licenses/dcraw/dcraw.txt +0 -24
  499. package/tools/licenses/vue-my-dropdown/LICENSE.txt +0 -19
  500. package/tools/linux-arm/dcraw/dcraw +0 -0
  501. package/tools/linux-arm/dcraw/install.sh +0 -5
  502. package/tools/linux-arm/jpegtran/README.md +0 -11
  503. package/tools/linux-arm/jpegtran/jpegtran +0 -0
  504. package/tools/linux-arm/sqlite3/sqlite3 +0 -0
  505. package/tools/linux-ia32/sqlite3/sqlite3 +0 -0
  506. package/tools/linux-x64/dcraw/dcraw +0 -0
  507. package/tools/linux-x64/jpegtran/jpegtran +0 -0
  508. package/tools/mac-x64/dcraw/dcraw +0 -0
  509. package/tools/mac-x64/dcraw/install.sh +0 -8
  510. package/tools/mac-x64/jpegtran/jpegtran +0 -0
  511. package/tools/mac-x64/sqlite3/README.md +0 -33
  512. package/tools/mac-x64/sqlite3/sqlite3 +0 -0
  513. package/tools/win-ia32/dcraw/README.md +0 -30
  514. package/tools/win-ia32/dcraw/dcraw.exe +0 -0
  515. package/tools/win-ia32/sqlite3/sqlite3.exe +0 -0
@@ -0,0 +1,59 @@
1
+ DROP TABLE IF EXISTS Progress_new;
2
+
3
+ CREATE TABLE Progress_new (
4
+ -- records sync process state
5
+ id INTEGER NOT NULL PRIMARY KEY,
6
+ uri TEXT NOT NULL,
7
+ hostname TEXT NOT NULL,
8
+ pid INTEGER NOT NULL,
9
+ volume TEXT NOT NULL,
10
+ state TEXT,
11
+ hed TEXT,
12
+ dekJSON TEXT,
13
+ completePct REAL,
14
+ incompletePct REAL,
15
+ scanningPct REAL,
16
+ createdAt INTEGER NOT NULL,
17
+ updatedAt INTEGER NOT NULL,
18
+ completedAt INTEGER
19
+ ) STRICT;
20
+
21
+ INSERT INTO
22
+ Progress_new (
23
+ id,
24
+ uri,
25
+ hostname,
26
+ pid,
27
+ volume,
28
+ state,
29
+ hed,
30
+ dekJSON,
31
+ completePct,
32
+ incompletePct,
33
+ scanningPct,
34
+ createdAt,
35
+ updatedAt,
36
+ completedAt
37
+ )
38
+ SELECT
39
+ id,
40
+ uri,
41
+ hostname,
42
+ pid,
43
+ volume,
44
+ state,
45
+ hed,
46
+ dekJSON,
47
+ completePct,
48
+ incompletePct,
49
+ scanningPct,
50
+ createdAt,
51
+ updatedAt,
52
+ completedAt
53
+ FROM
54
+ Progress;
55
+
56
+ DROP TABLE Progress;
57
+
58
+ ALTER TABLE Progress_new
59
+ RENAME TO Progress;
@@ -0,0 +1,3 @@
1
+ -- This file will run db/Migrations.rebuild_null_island
2
+ -- The prior release used Geolocation metadata to tag assets with GPSLatitide
3
+ -- and GPSLongitude of "0,0". This migration will remove those tags.
@@ -0,0 +1,2 @@
1
+ ALTER TABLE AssetFile
2
+ ADD COLUMN imageDataHash TEXT;
@@ -0,0 +1 @@
1
+ DROP TABLE IF EXISTS Task;
@@ -0,0 +1,3 @@
1
+ ALTER TABLE AssetFile
2
+ ADD COLUMN metadataDate INTEGER -- The value of the MetadataDate tag, in ms from common epoch
3
+ ;
@@ -0,0 +1,21 @@
1
+ -- Indexes on foreign keys are _ACTUALLY NEEDED_: see https://sqlite.org/foreignkeys.html
2
+ -- incorrect name:
3
+ DROP INDEX IF EXISTS assettag_fks;
4
+
5
+ -- We're going to make cover indexes, not just an index on assetId or tagId
6
+ -- specifically:
7
+ DROP INDEX IF EXISTS AssetTag_assetId_idx;
8
+
9
+ DROP INDEX IF EXISTS AssetTag_tagId_idx;
10
+
11
+ -- Cover indexes for AssetTag -- and yeah, we need both.
12
+ DROP INDEX IF EXISTS AssetTag_tagId_assetId_idx;
13
+
14
+ DROP INDEX IF EXISTS AssetTag_tagId_assetId_udx;
15
+
16
+ -- we're arbitrarily picking one of these indexes to enforce the unique constraint:
17
+ CREATE UNIQUE INDEX AssetTag_tagId_assetId_udx ON AssetTag (tagId, assetId);
18
+
19
+ DROP INDEX IF EXISTS AssetTag_assetId_tagId_idx;
20
+
21
+ CREATE INDEX AssetTag_assetId_tagId_idx ON AssetTag (assetId, tagId);
@@ -0,0 +1,13 @@
1
+ CREATE TABLE TagHierarchy -- join table to associate descendant and ancestor Tags.
2
+ (
3
+ tagId INTEGER NOT NULL,
4
+ descendantId INTEGER NOT NULL,
5
+ depth INTEGER NOT NULL,
6
+ PRIMARY KEY (tagId, descendantId),
7
+ FOREIGN KEY (tagId) REFERENCES Tag (id) ON DELETE CASCADE,
8
+ FOREIGN KEY (descendantId) REFERENCES Tag (id) ON DELETE CASCADE
9
+ ) STRICT;
10
+
11
+ CREATE INDEX IF NOT EXISTS TagHierarchy_descendantId_depth_idx ON TagHierarchy (descendantId, depth);
12
+
13
+ CREATE INDEX IF NOT EXISTS TagHierarchy_tagId_depth_idx ON TagHierarchy (tagId, depth);
@@ -0,0 +1,170 @@
1
+ -- Tables will be backfilled by 20250423_schema_v3_backfill.sql.
2
+ --
3
+ -- See https://www.sqlite.org/lang_altertable.html#otheralter
4
+ --------------------------------------
5
+ -- Create normalized URI storage tables
6
+ --------------------------------------
7
+ DROP TABLE IF EXISTS Volume;
8
+
9
+ -- Backstop for resolving URIs when volumes aren't mounted. No foreign keys
10
+ -- reference this table - pslib:// and file:// URIs have no volsha, and
11
+ -- psfile:// URIs resolve via the most recently seen mountpoint for their authority.
12
+ CREATE TABLE Volume (
13
+ id INTEGER PRIMARY KEY,
14
+ authority TEXT NOT NULL, -- aka "volsha"
15
+ mountPoint TEXT NOT NULL,
16
+ lastSeenAt INTEGER NOT NULL -- epoch ms when volume was last mounted/scanned
17
+ ) STRICT;
18
+
19
+ CREATE UNIQUE INDEX IF NOT EXISTS Volume_authority_mountpoint_udx ON Volume (authority, mountPoint);
20
+
21
+ DROP TABLE IF EXISTS DirUri;
22
+
23
+ -- This normalizes the URIs we store -- AssetFiles just need to store their
24
+ -- parent's URI and their basename. We _could_ have stored normalized paths with
25
+ -- recursive parent id references, and that would indeed be the most storage
26
+ -- efficient, but let's not require us to use SQLite recursion CTE syntax if we
27
+ -- don't absolutely need to.
28
+ CREATE TABLE DirUri (
29
+ id INTEGER NOT NULL PRIMARY KEY,
30
+ uri TEXT NOT NULL -- The directory part of a URI (e.g., "psfile://abc123/path/to/")
31
+ ) STRICT;
32
+
33
+ CREATE UNIQUE INDEX IF NOT EXISTS DirUri_uri_udx ON DirUri (uri);
34
+
35
+ --------------------------------------
36
+ -- Create enhanced Asset table with promoted metadata from AssetFile
37
+ --------------------------------------
38
+ DROP TABLE IF EXISTS Asset_new;
39
+
40
+ CREATE TABLE Asset_new (
41
+ id INTEGER NOT NULL PRIMARY KEY,
42
+ shown INTEGER NOT NULL DEFAULT 0, -- 0 means work-in-progress
43
+ hidden INTEGER NOT NULL DEFAULT 0, -- hidden by the user
44
+ -- materialized from the primary assetFile
45
+ capturedAtLocal INTEGER NOT NULL, -- used for sorting
46
+ mimetype TEXT NOT NULL, -- used as filter
47
+ rating INTEGER, -- used as filter
48
+ durationMs INTEGER, -- used in UI
49
+ -- bookkeeping:
50
+ flags INTEGER,
51
+ deletedAt INTEGER,
52
+ excludedAt INTEGER,
53
+ createdAt INTEGER NOT NULL,
54
+ updatedAt INTEGER NOT NULL,
55
+ updateCount INTEGER NOT NULL DEFAULT 0 -- used for client-side cache invalidation. TODO: replace with updatedAt via ETAGS?
56
+ ) STRICT;
57
+
58
+ DROP TABLE IF EXISTS AssetFile_new;
59
+
60
+ --------------------------------------
61
+ -- AssetFile table now supports "orphans" (to-be-aggregated rows) and new image
62
+ -- hash algorithms
63
+ --------------------------------------
64
+ CREATE TABLE AssetFile_new (
65
+ id INTEGER NOT NULL PRIMARY KEY,
66
+ dirUriId INTEGER NOT NULL REFERENCES DirUri (id),
67
+ basename TEXT NOT NULL, -- Just the filename portion of the URI
68
+ assetId INTEGER REFERENCES Asset_new (id), -- null means orphan
69
+ isPrimary INTEGER NOT NULL DEFAULT 0,
70
+ -- quick no-op fields
71
+ mtime INTEGER NOT NULL,
72
+ fileSize INTEGER NOT NULL,
73
+ -- primary metadata
74
+ mimetype TEXT NOT NULL,
75
+ width INTEGER NOT NULL, -- Required for AssetFile comparison
76
+ height INTEGER NOT NULL, -- Required for AssetFile comparison
77
+ rotation INTEGER, -- Required for AssetFile comparison
78
+ durationMs INTEGER,
79
+ -- aggregation fields
80
+ cameraId TEXT, -- TODO: normalize?
81
+ lensId TEXT, -- TODO: normalize?
82
+ imageDataHash TEXT,
83
+ imageId TEXT,
84
+ metadataDate INTEGER, -- last metadata edit timestamp, millis from common epoch
85
+ sha TEXT NOT NULL,
86
+ -- captured at:
87
+ capturedAtLocal INTEGER NOT NULL,
88
+ capturedAtPrecisionMs INTEGER,
89
+ capturedAtZone TEXT,
90
+ capturedAtSrc TEXT,
91
+ -- asset info panel:
92
+ make TEXT,
93
+ model TEXT,
94
+ rating INTEGER,
95
+ aperture REAL,
96
+ focalLength TEXT, -- although always in mm, we use string to retain precision
97
+ fps REAL,
98
+ geohash INTEGER,
99
+ iso INTEGER,
100
+ shutterSpeed TEXT, -- _actually_ store "1/250"
101
+ -- image hash fields:
102
+ monochrome INTEGER,
103
+ -- aHash TEXT,
104
+ -- dHash TEXT,
105
+ -- vHash TEXT,
106
+ pHash TEXT,
107
+ rHash TEXT,
108
+ wHash TEXT,
109
+ pHash0 TEXT,
110
+ rHash0 TEXT,
111
+ wHash0 TEXT,
112
+ -- bookkeeping:
113
+ flags INTEGER,
114
+ createdAt INTEGER NOT NULL,
115
+ updatedAt INTEGER NOT NULL,
116
+ updateCount INTEGER NOT NULL DEFAULT 0 -- used for cache invalidation. TODO: replace with updatedAt via ETAGS?
117
+ ) STRICT;
118
+
119
+ --------------------------------------
120
+ -- Drop and recreate Asset indexes
121
+ --------------------------------------
122
+ DROP INDEX IF EXISTS asset_cap_idx;
123
+
124
+ DROP INDEX IF EXISTS asset_deletedAt_idx;
125
+
126
+ DROP INDEX IF EXISTS asset_excludedAt_idx;
127
+
128
+ --------------------------------------
129
+ -- Drop and recreate AssetFile indexes
130
+ --------------------------------------
131
+ DROP INDEX IF EXISTS assetfile_capturedAtLocal_idx;
132
+
133
+ DROP INDEX IF EXISTS assetfile_meanHash_idx;
134
+
135
+ DROP INDEX IF EXISTS assetfile_mode0_idx;
136
+
137
+ DROP INDEX IF EXISTS assetfile_mode1_idx;
138
+
139
+ DROP INDEX IF EXISTS assetfile_mode2_idx;
140
+
141
+ DROP INDEX IF EXISTS assetfile_recent_idx;
142
+
143
+ DROP INDEX IF EXISTS assetfile_sha_idx;
144
+
145
+ DROP INDEX IF EXISTS assetfile_shown_udx;
146
+
147
+ DROP INDEX IF EXISTS assetfile_uri_udx;
148
+
149
+ -- For the files that pass the cheap filters, but are rejected by the expensive
150
+ -- filters, this table allows subsequent `sync` runs to skip those expensive
151
+ -- filters. If filters are changed, we drop this table.
152
+ CREATE TABLE RejectedFile (
153
+ id INTEGER NOT NULL PRIMARY KEY,
154
+ dirUriId INTEGER NOT NULL REFERENCES DirUri (id),
155
+ basename TEXT NOT NULL, -- Just the filename portion of the URI
156
+ mtime INTEGER NOT NULL,
157
+ fileSize INTEGER NOT NULL,
158
+ why TEXT NOT NULL,
159
+ updatedAt INTEGER NOT NULL
160
+ ) STRICT;
161
+
162
+ CREATE UNIQUE INDEX IF NOT EXISTS RejectedFile_udx ON RejectedFile (dirUriId, basename);
163
+
164
+ -- Cleanup trigger for the tag_fts table:
165
+ CREATE TRIGGER tag_ad AFTER DELETE ON Tag BEGIN
166
+ DELETE FROM tag_fts
167
+ WHERE
168
+ rowid = OLD.id;
169
+
170
+ END;
@@ -0,0 +1 @@
1
+ -- This file will run db/Migrations.schema_v3_backfill_nofk
@@ -0,0 +1,80 @@
1
+ DROP INDEX IF EXISTS Asset_capturedAtLocal_idx;
2
+
3
+ CREATE INDEX Asset_capturedAtLocal_idx ON Asset (capturedAtLocal)
4
+ WHERE
5
+ shown = 1
6
+ AND hidden = 0
7
+ AND excludedAt IS NULL
8
+ AND deletedAt IS NULL;
9
+
10
+ DROP INDEX IF EXISTS Asset_reaggregate_idx;
11
+
12
+ CREATE INDEX Asset_reaggregate_idx ON Asset (id)
13
+ WHERE
14
+ (flags & 1) != 0;
15
+
16
+ DROP INDEX IF EXISTS Asset_sort_idx;
17
+
18
+ CREATE INDEX Asset_sort_idx ON Asset (id)
19
+ WHERE
20
+ (flags & 2) != 0;
21
+
22
+ DROP INDEX IF EXISTS Asset_tag_idx;
23
+
24
+ CREATE INDEX Asset_tag_idx ON Asset (id)
25
+ WHERE
26
+ (flags & 4) != 0;
27
+
28
+ DROP INDEX IF EXISTS Asset_previews_idx;
29
+
30
+ CREATE INDEX Asset_previews_idx ON Asset (id)
31
+ WHERE
32
+ (flags & 8) != 0;
33
+
34
+ DROP INDEX IF EXISTS Asset_not_hidden_idx;
35
+
36
+ CREATE INDEX Asset_not_hidden_idx ON Asset (id)
37
+ WHERE
38
+ hidden = 0
39
+ AND excludedAt IS NULL
40
+ AND deletedAt IS NULL;
41
+
42
+ DROP INDEX IF EXISTS Asset_captured_at_idx;
43
+
44
+ CREATE INDEX Asset_captured_at_idx ON Asset (id, capturedAtLocal);
45
+
46
+ DROP INDEX IF EXISTS AssetFile_imageDataHash_idx;
47
+
48
+ CREATE INDEX AssetFile_imageDataHash_idx ON AssetFile (imageDataHash)
49
+ WHERE
50
+ imageDataHash IS NOT NULL;
51
+
52
+ DROP INDEX IF EXISTS AssetFile_primary_udx;
53
+
54
+ CREATE UNIQUE INDEX AssetFile_primary_udx ON AssetFile (assetId, isPrimary)
55
+ WHERE
56
+ assetId IS NOT NULL
57
+ AND isPrimary = 1;
58
+
59
+ DROP INDEX IF EXISTS AssetFile_sha_idx;
60
+
61
+ CREATE INDEX AssetFile_sha_idx ON AssetFile (sha);
62
+
63
+ DROP INDEX IF EXISTS AssetFile_assetId_idx;
64
+
65
+ CREATE INDEX AssetFile_assetId_idx ON AssetFile (assetId, flags);
66
+
67
+ DROP INDEX IF EXISTS AssetFile_uri_udx;
68
+
69
+ CREATE UNIQUE INDEX AssetFile_uri_udx ON AssetFile (dirUriId, basename);
70
+
71
+ -- Ensure `_path LIKE ...` is performant
72
+ DROP INDEX IF EXISTS tag_path_udx;
73
+
74
+ DROP INDEX IF EXISTS Tag_path_udx;
75
+
76
+ CREATE UNIQUE INDEX Tag_path_udx ON Tag (_path COLLATE NOCASE);
77
+
78
+ DROP INDEX IF EXISTS Tag_parentId_idx;
79
+
80
+ CREATE INDEX Tag_parentId_idx ON Tag (parentId);
@@ -0,0 +1,31 @@
1
+ -- Add scan generation tracking for resumable directory sync
2
+ --
3
+ -- lastVisitedGeneration: Tracks which scan generation last visited this file.
4
+ -- Files where lastVisitedGeneration < current generation weren't visited in the
5
+ -- current scan and are potentially stale (deleted from disk).
6
+ --
7
+ -- scanGeneration is stored in ProgressMeta (not Progress table) to track the
8
+ -- current/last generation for each sync path.
9
+ --
10
+ -- This replaces the boolean "unvisited" flag approach which required:
11
+ -- 1. Bulk update to mark all files unvisited at scan start (expensive)
12
+ -- 2. Ambiguity when scan is interrupted (can't distinguish "not yet reached" from "stale")
13
+ --
14
+ -- With generation counters:
15
+ -- - No bulk update at scan start (just increment counter in ProgressMeta)
16
+ -- - Interrupted scans can resume: files with currentGeneration were visited this scan
17
+ -- - Files with priorGeneration weren't visited yet (may be stale or just not reached)
18
+ ALTER TABLE AssetFile
19
+ ADD COLUMN lastVisitedGeneration INTEGER;
20
+
21
+ -- Initialize existing files with generation 0
22
+ -- New scans will use generation 1+, so all existing files will be checked
23
+ UPDATE AssetFile
24
+ SET
25
+ lastVisitedGeneration = 0
26
+ WHERE
27
+ lastVisitedGeneration IS NULL;
28
+
29
+ -- Index for efficient stale file queries
30
+ -- Query pattern: WHERE lastVisitedGeneration < ? AND dirUriId IN (SELECT id FROM DirUri WHERE uri LIKE ?)
31
+ CREATE INDEX IF NOT EXISTS idx_assetfile_generation ON AssetFile (lastVisitedGeneration);
@@ -0,0 +1,5 @@
1
+ DROP INDEX IF EXISTS idx_assetfile_generation;
2
+
3
+ -- Index for efficient stale file queries
4
+ -- Query pattern: WHERE lastVisitedGeneration < ? AND dirUriId IN (SELECT id FROM DirUri WHERE uri LIKE ?)
5
+ CREATE INDEX IF NOT EXISTS AssetFile_dirUriId_generation_idx ON AssetFile (dirUriId, lastVisitedGeneration);
@@ -0,0 +1,10 @@
1
+ -- Add capturedAtLocal and capturedAtFuzzy metadata columns to AssetFileHash vec0 table
2
+ --
3
+ -- Vec0 virtual tables do not support ALTER TABLE, so we must drop and recreate.
4
+ -- The table will be recreated by ensureAssetFileHashTable() with the new schema:
5
+ -- - capturedAtLocal INTEGER (for time-windowed KNN queries)
6
+ -- - capturedAtFuzzy INTEGER (1 = fuzzy/mtime/path, 0 = precise/EXIF)
7
+ --
8
+ -- The AssetFileHashHealthCheck will detect the missing/empty table and auto-rebuild
9
+ -- the index with the new columns populated from AssetFile data.
10
+ DROP TABLE IF EXISTS AssetFileHash;
@@ -0,0 +1,8 @@
1
+ -- Move deprecated "reaggregate" flag (bit 0) to "validateSiblings" (bit 2).
2
+ -- Assets marked for reaggregation before the upgrade need sibling validation
3
+ -- to complete the equivalent work under the new dissolve-based system.
4
+ UPDATE Asset
5
+ SET
6
+ flags = (flags | 4) & ~ 1
7
+ WHERE
8
+ (flags & 1) != 0;
@@ -0,0 +1,3 @@
1
+ -- JS migration: see Migrations.captured_at_src_detail in src/library/db/Migrations.ts
2
+ -- Adds capturedAtSrcDetail and capturedAtZoneSrc columns to AssetFile.
3
+ -- Uses JS to check column existence first (idempotent for partial prior runs).
@@ -0,0 +1,2 @@
1
+ -- JS migration: see Migrations.captured_at_src_backfill in src/library/db/Migrations.ts
2
+ -- Decomposes legacy capturedAtSrc compound strings into atomic fields.
@@ -0,0 +1,5 @@
1
+ -- Drop the tag_fts FTS5 virtual table and its cleanup trigger.
2
+ -- Tag search now uses LIKE queries on Tag._path directly.
3
+ DROP TABLE IF EXISTS tag_fts;
4
+
5
+ DROP TRIGGER IF EXISTS tag_ad;
@@ -0,0 +1,5 @@
1
+ -- Add nullable `label` column to Volume so we can render a friendly tag display
2
+ -- name (e.g. "Photos USB Drive") even when the volume is currently unmounted.
3
+ -- Populated by Volume.onVolumeGet() from VolumeMetadata.label.
4
+ ALTER TABLE Volume
5
+ ADD COLUMN label TEXT;
@@ -0,0 +1,6 @@
1
+ -- Add shortest normalized basename metadata to AssetFileHash vec0 table.
2
+ --
3
+ -- Vec0 virtual tables do not support ALTER TABLE, so we must drop and recreate.
4
+ -- The AssetFileHashHealthCheck will detect the missing/empty table and rebuild
5
+ -- the index with bname populated from AssetFile.basename.
6
+ DROP TABLE IF EXISTS AssetFileHash;