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.
- package/LICENSE.md +31 -29
- package/README.md +20 -8
- package/SECURITY.md +29 -0
- package/VERSION.json +12 -0
- package/bin/bootstrap.js +9 -0
- package/bin/fix.js +9 -0
- package/bin/info.js +9 -0
- package/bin/list.js +9 -0
- package/bin/logcat.js +9 -0
- package/bin/logtail.js +9 -0
- package/bin/main.js +9 -0
- package/bin/photostructure.js +9 -0
- package/bin/sync.js +9 -0
- package/bin/web.js +9 -0
- package/bin/worker.js +9 -0
- package/data/cuss.txt.br +0 -0
- package/data/icc/AdobeCompat-v2.icc +0 -0
- package/data/icc/AppleCompat-v2.icc +0 -0
- package/data/icc/ColorMatchCompat-v2.icc +0 -0
- package/data/icc/DisplayP3-v2-magic.icc +0 -0
- package/data/icc/DisplayP3-v2-micro.icc +0 -0
- package/data/icc/DisplayP3-v4.icc +0 -0
- package/data/icc/DisplayP3Compat-v2-magic.icc +0 -0
- package/data/icc/DisplayP3Compat-v2-micro.icc +0 -0
- package/data/icc/DisplayP3Compat-v4.icc +0 -0
- package/data/icc/ProPhoto-v2-magic.icc +0 -0
- package/data/icc/ProPhoto-v2-micro.icc +0 -0
- package/data/icc/ProPhoto-v4.icc +0 -0
- package/data/icc/Rec2020-v2-magic.icc +0 -0
- package/data/icc/Rec2020-v2-micro.icc +0 -0
- package/data/icc/Rec2020-v4.icc +0 -0
- package/data/icc/Rec2020Compat-v2-magic.icc +0 -0
- package/data/icc/Rec2020Compat-v2-micro.icc +0 -0
- package/data/icc/Rec2020Compat-v4.icc +0 -0
- package/data/icc/Rec709-v2-magic.icc +0 -0
- package/data/icc/Rec709-v2-micro.icc +0 -0
- package/data/icc/Rec709-v4.icc +0 -0
- package/data/icc/WideGamutCompat-v2.icc +0 -0
- package/data/icc/_info.md +49 -0
- package/data/icc/license +116 -0
- package/data/icc/readme.md +142 -0
- package/data/icc/sGrey-v2-magic.icc +0 -0
- package/data/icc/sGrey-v2-micro.icc +0 -0
- package/data/icc/sGrey-v2-nano.icc +0 -0
- package/data/icc/sGrey-v4.icc +0 -0
- package/data/icc/sRGB-v2-magic.icc +0 -0
- package/data/icc/sRGB-v2-micro.icc +0 -0
- package/data/icc/sRGB-v2-nano.icc +0 -0
- package/data/icc/sRGB-v4.icc +0 -0
- package/data/icc/scRGB-v2.icc +0 -0
- package/data/migrations/models/20181030_models.sql +151 -0
- package/data/migrations/models/20190417_rotation.sql +2 -0
- package/data/migrations/models/20190425_merged_assets.sql +11 -0
- package/{migrations → data/migrations}/models/20190426_clean_sha.sql +4 -4
- package/data/migrations/models/20190426_lowercase_psnet_hostname.sql +1 -0
- package/{migrations → data/migrations}/models/20190727_find_by_ca_and_geo.sql +3 -1
- package/data/migrations/models/20190730_session.sql +7 -0
- package/data/migrations/models/20190922_numeric_captured_at.sql +1 -0
- package/data/migrations/models/20190923_asset_file_v2_nofk.sql +107 -0
- package/data/migrations/models/20191013_asset_v2_nofk.sql +81 -0
- package/data/migrations/models/20200104_video_duration.sql +9 -0
- package/data/migrations/models/20200116_heartbeat.sql +9 -0
- package/data/migrations/models/20200127_spread_modes.sql +1 -0
- package/data/migrations/models/20200128_asset_file_v3_nofk.sql +143 -0
- package/data/migrations/models/20200130_advisory_lock.sql +21 -0
- package/data/migrations/models/20200211_updateCount.sql +2 -0
- package/data/migrations/models/20200512_asset_file_v4_nofk.sql +145 -0
- package/data/migrations/models/20200515_drop_merged_asset.sql +1 -0
- package/data/migrations/models/20200816_normalize_asset_file_uris.sql +1 -0
- package/data/migrations/models/20200823_add_asset_excluded.sql +11 -0
- package/data/migrations/models/20200825_fix_root_tags.sql +1 -0
- package/data/migrations/models/20200826_dedupe_tag_paths.sql +1 -0
- package/data/migrations/models/20200827_tag_v2_nofk.sql +35 -0
- package/data/migrations/models/20200923_suffix_tag_paths.sql +1 -0
- package/data/migrations/models/20200927_progress_v2.sql +23 -0
- package/data/migrations/models/20201006_progress_meta.sql +16 -0
- package/data/migrations/models/20201007_operation.sql +12 -0
- package/data/migrations/models/20201023_dedupe_tag_paths.sql +1 -0
- package/data/migrations/models/20201026_normalize_asset_file_uris.sql +1 -0
- package/data/migrations/models/20201030_add_tag_counts.sql +5 -0
- package/data/migrations/models/20201106_normalize_tag_paths.sql +1 -0
- package/data/migrations/models/20201112_tag_display_name.sql +2 -0
- package/data/migrations/models/20201113_drop_tc_tables.sql +1 -0
- package/data/migrations/models/20201211_tag_description.sql +5 -0
- package/data/migrations/models/20210322_sha_blocklist.sql +6 -0
- package/data/migrations/models/20210323_create_tag_fts.sql +1 -0
- package/data/migrations/models/20210324_asset_fave_delete.sql +20 -0
- package/data/migrations/models/20210531_asset_duration.sql +20 -0
- package/data/migrations/models/20210604_changed_tag.sql +7 -0
- package/data/migrations/models/20210627_changed_tag_updated_at.sql +2 -0
- package/data/migrations/models/20210827_asset_excluded_at.sql +19 -0
- package/data/migrations/models/20210930_asset_file_rating.sql +2 -0
- package/data/migrations/models/20210930_asset_revision.sql +16 -0
- package/data/migrations/models/20211025_ts_cleanup.sql +11 -0
- package/data/migrations/models/20220222_rebuild_rotated_heic.sql +2 -0
- package/data/migrations/models/20220922_rebuild_videos.sql +3 -0
- package/data/migrations/models/20220923_add_asset_file_mode_pct.sql +63 -0
- package/data/migrations/models/20221031_add_asset_file_hashes.sql +5 -0
- package/data/migrations/models/20231105_copy_asset_duration.sql +3 -0
- package/data/migrations/models/20231115_strict_nofk.sql +674 -0
- package/data/migrations/models/20231116_rebuild_tag_asset_counts.sql +1 -0
- package/data/migrations/models/20240115_task.sql +18 -0
- package/data/migrations/models/20240131_drop_operation_version.sql +35 -0
- package/data/migrations/models/20240201_create_tag_fts.sql +1 -0
- package/data/migrations/models/20240307_rebuild_progress_nofk.sql +59 -0
- package/data/migrations/models/20240313_rebuild_null_island.sql +3 -0
- package/data/migrations/models/20240723_add_asset_file_image_data_hash.sql +2 -0
- package/data/migrations/models/20240920_drop_task.sql +1 -0
- package/data/migrations/models/20240929_metadata_local.sql +3 -0
- package/data/migrations/models/20250421_asset_tag_fk_indexes.sql +21 -0
- package/data/migrations/models/20250421_tag_hierarchy.sql +13 -0
- package/data/migrations/models/20250422_schema_v3.sql +170 -0
- package/data/migrations/models/20250423_schema_v3_backfill_nofk.sql +1 -0
- package/data/migrations/models/20250929_indexes.sql +80 -0
- package/data/migrations/models/20260117_scan_generation.sql +31 -0
- package/data/migrations/models/20260122_fix_scan_generation_idx.sql +5 -0
- package/data/migrations/models/20260204_vec0_captured_at_local.sql +10 -0
- package/data/migrations/models/20260217_reaggregate_to_validate_siblings.sql +8 -0
- package/data/migrations/models/20260321_captured_at_src_detail.sql +3 -0
- package/data/migrations/models/20260322_captured_at_src_backfill.sql +2 -0
- package/data/migrations/models/20260403_drop_tag_fts.sql +5 -0
- package/data/migrations/models/20260425_volume_label.sql +5 -0
- package/data/migrations/models/20260426_vec0_bname.sql +6 -0
- package/data/models-schema.json +907 -0
- package/data/models-schema.sql +268 -0
- package/data/words.txt.br +0 -0
- package/defaults.env +6376 -0
- package/package.json +47 -25
- package/photostructure +26 -27
- package/public/192.png.gz +0 -0
- package/public/3rd-party-licenses.html.gz +0 -0
- package/public/3rd-party-licenses.txt.gz +0 -0
- package/public/512.png.gz +0 -0
- package/public/app/Array.js +8 -0
- package/public/app/Array.js.gz +0 -0
- package/public/app/BabyMarkdown.js +14 -0
- package/public/app/BabyMarkdown.js.gz +0 -0
- package/public/app/DropDown.vue_vue_type_script_setup_true_lang.js +12 -0
- package/public/app/DropDown.vue_vue_type_script_setup_true_lang.js.gz +0 -0
- package/public/app/HealthChecks.js +8 -0
- package/public/app/HealthChecks.js.gz +0 -0
- package/public/app/Lazy.js +8 -0
- package/public/app/Lazy.js.gz +0 -0
- package/public/app/PageActionsMenu.vue_vue_type_script_setup_true_lang.js +8 -0
- package/public/app/PageActionsMenu.vue_vue_type_script_setup_true_lang.js.gz +0 -0
- package/public/app/ProgressState.js +8 -0
- package/public/app/Random.js +8 -0
- package/public/app/SSEChannels.js +8 -0
- package/public/app/SSEChannels.js.gz +0 -0
- package/public/app/Search.js +8 -0
- package/public/app/Search.js.gz +0 -0
- package/public/app/StickyHeader.js +8 -0
- package/public/app/StickyHeader.js.gz +0 -0
- package/public/app/Tag.js +8 -0
- package/public/app/Tag.js.gz +0 -0
- package/public/app/_plugin-vue_export-helper.js +8 -0
- package/public/app/_plugin-vue_export-helper.js.gz +0 -0
- package/public/app/about.css +8 -0
- package/public/app/about.css.gz +0 -0
- package/public/app/about.js +8 -0
- package/public/app/about.js.gz +0 -0
- package/public/app/app.css +8 -0
- package/public/app/app.css.gz +0 -0
- package/public/app/app.js +12 -0
- package/public/app/app.js.gz +0 -0
- package/public/app/health.css +8 -0
- package/public/app/health.css.gz +0 -0
- package/public/app/health.js +10 -0
- package/public/app/health.js.gz +0 -0
- package/public/app/logs.css +8 -0
- package/public/app/logs.css.gz +0 -0
- package/public/app/logs.js +8 -0
- package/public/app/logs.js.gz +0 -0
- package/public/app/onReady.js +8 -0
- package/public/app/platform.js +8 -0
- package/public/app/roboto-mono-v22-latin-700.woff2.gz +0 -0
- package/public/app/roboto-mono-v22-latin-regular.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-700.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-700italic.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-italic.woff2.gz +0 -0
- package/public/app/roboto-v30-latin-regular.woff2.gz +0 -0
- package/public/app/settings.css +8 -0
- package/public/app/settings.css.gz +0 -0
- package/public/app/settings.js +8 -0
- package/public/app/settings.js.gz +0 -0
- package/public/app/splash.css +8 -0
- package/public/app/splash.css.gz +0 -0
- package/public/app/splash.js +8 -0
- package/public/app/splash.js.gz +0 -0
- package/public/app/sse-worker.js +8 -0
- package/public/app/sse-worker.js.gz +0 -0
- package/public/app/sync.css +8 -0
- package/public/app/sync.css.gz +0 -0
- package/public/app/sync.js +12 -0
- package/public/app/sync.js.gz +0 -0
- package/public/app/toast.js +9 -0
- package/public/app/toast.js.gz +0 -0
- package/public/app/useAnchorHighlight.js +8 -0
- package/public/app/useSectionPersistence.js +8 -0
- package/public/app/useSectionPersistence.js.gz +0 -0
- package/public/apple-touch-icon.png.gz +0 -0
- package/public/browserconfig.xml +9 -0
- package/public/eula.html +25 -26
- package/public/favicon-16x16.png.gz +0 -0
- package/public/favicon-32x32.png.gz +0 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/roboto-mono-v22-latin-700.woff2.gz +0 -0
- package/public/fonts/roboto-mono-v22-latin-regular.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-700.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-700italic.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-italic.woff2.gz +0 -0
- package/public/fonts/roboto-v30-latin-regular.woff2.gz +0 -0
- package/public/icon.svg.gz +0 -0
- package/public/images/1.png.gz +0 -0
- package/public/images/128.png +0 -0
- package/public/images/22-Template.png.gz +0 -0
- package/public/images/22-Template@2x.png.gz +0 -0
- package/public/images/22-Template@3x.png.gz +0 -0
- package/public/images/22-blue.png.gz +0 -0
- package/public/images/22-blue@2x.png.gz +0 -0
- package/public/images/22-blue@3x.png.gz +0 -0
- package/public/images/22-dark.png +0 -0
- package/public/images/22-dark@2x.png +0 -0
- package/public/images/22-dark@3x.png +0 -0
- package/public/images/22-gradient.png.gz +0 -0
- package/public/images/22-gradient@2x.png.gz +0 -0
- package/public/images/22-gradient@3x.png.gz +0 -0
- package/public/images/22-light.png +0 -0
- package/public/images/22-light@2x.png +0 -0
- package/public/images/22-light@3x.png +0 -0
- package/public/images/256.png +0 -0
- package/public/images/512.png.gz +0 -0
- package/public/images/64.png +0 -0
- package/public/images/antenna.svg.gz +0 -0
- package/public/images/article.svg.gz +0 -0
- package/public/images/baby.svg.gz +0 -0
- package/public/images/ballot-box.svg.gz +0 -0
- package/public/images/bank.svg.gz +0 -0
- package/public/images/bar-chart.svg.gz +0 -0
- package/public/images/beetle.svg.gz +0 -0
- package/public/images/birthday.svg.gz +0 -0
- package/public/images/bookmark-tabs.svg.gz +0 -0
- package/public/images/books-desat.svg.gz +0 -0
- package/public/images/books.svg.gz +0 -0
- package/public/images/busy-circle.svg.gz +0 -0
- package/public/images/busy-circles.svg.gz +0 -0
- package/public/images/busy-dots.svg.gz +0 -0
- package/public/images/busy.svg.gz +0 -0
- package/public/images/calendar.svg.gz +0 -0
- package/public/images/camera.svg.gz +0 -0
- package/public/images/card-box.svg.gz +0 -0
- package/public/images/card-index-dividers.svg.gz +0 -0
- package/public/images/cd.svg.gz +0 -0
- package/public/images/chart.svg.gz +0 -0
- package/public/images/check.svg.gz +0 -0
- package/public/images/checkered-flag.svg.gz +0 -0
- package/public/images/clear-256.png.gz +0 -0
- package/public/images/clear-64.png.gz +0 -0
- package/public/images/clock.svg.gz +0 -0
- package/public/images/computer.svg.gz +0 -0
- package/public/images/cpu.svg.gz +0 -0
- package/public/images/crane.svg.gz +0 -0
- package/public/images/cross-mark.svg.gz +0 -0
- package/public/images/disabled.svg.gz +0 -0
- package/public/images/dvd.svg.gz +0 -0
- package/public/images/emergency-light.svg.gz +0 -0
- package/public/images/error.svg.gz +0 -0
- package/public/images/expressionless-desat.svg.gz +0 -0
- package/public/images/expressionless.svg.gz +0 -0
- package/public/images/file-cabinet.svg.gz +0 -0
- package/public/images/fill.svg.gz +0 -0
- package/public/images/floppy.svg.gz +0 -0
- package/public/images/gift.svg.gz +0 -0
- package/public/images/green-check.svg.gz +0 -0
- package/public/images/green-radio.svg.gz +0 -0
- package/public/images/handshake.svg.gz +0 -0
- package/public/images/health.svg.gz +0 -0
- package/public/images/heart.svg.gz +0 -0
- package/public/images/home.svg.gz +0 -0
- package/public/images/homebrew-installer.png.gz +0 -0
- package/public/images/info.svg.gz +0 -0
- package/public/images/library.svg.gz +0 -0
- package/public/images/logo-blue.svg.gz +0 -0
- package/public/images/logo-circle.svg.gz +0 -0
- package/public/images/logo-dark-700pt.svg.gz +0 -0
- package/public/images/logo-dark.svg.gz +0 -0
- package/public/images/logo-gradient-gloss-512w.png.gz +0 -0
- package/public/images/logo-gradient-gloss.svg.gz +0 -0
- package/public/images/logo-gradient-square-512w.png.gz +0 -0
- package/public/images/logo-gradient.svg.gz +0 -0
- package/public/images/logo-horizontal-600w.png.gz +0 -0
- package/public/images/logo-horizontal-white.svg.gz +0 -0
- package/public/images/logo-horizontal.svg.gz +0 -0
- package/public/images/logo-lite.svg.gz +0 -0
- package/public/images/logo-plus-512w.png.gz +0 -0
- package/public/images/logo-plus-horizontal.svg.gz +0 -0
- package/public/images/logo-plus.svg.gz +0 -0
- package/public/images/logo-square.svg.gz +0 -0
- package/public/images/logo-white.svg.gz +0 -0
- package/public/images/logo.ico +0 -0
- package/public/images/logo.png +0 -0
- package/public/images/logo@2x.png.gz +0 -0
- package/public/images/logo@3x.png.gz +0 -0
- package/public/images/logo@4x.png.gz +0 -0
- package/public/images/logo@5x.png +0 -0
- package/public/images/maximize.svg.gz +0 -0
- package/public/images/microscope.svg.gz +0 -0
- package/public/images/minidisc.svg.gz +0 -0
- package/public/images/movie-camera.svg.gz +0 -0
- package/public/images/navigate_next.svg.gz +0 -0
- package/public/images/new-yellow.svg.gz +0 -0
- package/public/images/new.svg.gz +0 -0
- package/public/images/open-book.svg.gz +0 -0
- package/public/images/open-folder.svg.gz +0 -0
- package/public/images/pause.svg.gz +0 -0
- package/public/images/photostructure-black.svg.gz +0 -0
- package/public/images/photostructure-white.svg.gz +0 -0
- package/public/images/refresh.svg.gz +0 -0
- package/public/images/rocket.svg.gz +0 -0
- package/public/images/sad-cat.svg.gz +0 -0
- package/public/images/safe.svg.gz +0 -0
- package/public/images/scales.svg.gz +0 -0
- package/public/images/seedling.svg.gz +0 -0
- package/public/images/shield.svg.gz +0 -0
- package/public/images/sleeping-face-desat.svg.gz +0 -0
- package/public/images/sleeping-face.svg.gz +0 -0
- package/public/images/sparkles.svg.gz +0 -0
- package/public/images/speed.svg.gz +0 -0
- package/public/images/splash.svg +1 -1
- package/public/images/splashbg1-1024w.jpg +0 -0
- package/public/images/splashbg2-1024w.jpg +0 -0
- package/public/images/splashbg3-1024w.jpg +0 -0
- package/public/images/splashbg4-1024w.jpg +0 -0
- package/public/images/splashbg5-1024w.jpg +0 -0
- package/public/images/splashbg6-1024w.jpg +0 -0
- package/public/images/star2.svg.gz +0 -0
- package/public/images/starry-night.svg.gz +0 -0
- package/public/images/stethoscope.svg.gz +0 -0
- package/public/images/stop.svg.gz +0 -0
- package/public/images/surf.svg.gz +0 -0
- package/public/images/sync.svg.gz +0 -0
- package/public/images/tada.svg.gz +0 -0
- package/public/images/terminal.svg.gz +0 -0
- package/public/images/thinking.svg.gz +0 -0
- package/public/images/thumbs-down.svg.gz +0 -0
- package/public/images/thumbs-up.svg.gz +0 -0
- package/public/images/toolbox.svg.gz +0 -0
- package/public/images/tools.svg.gz +0 -0
- package/public/images/umbrella.svg.gz +0 -0
- package/public/images/warning.svg.gz +0 -0
- package/public/images/wave.svg.gz +0 -0
- package/public/images/wrench.svg.gz +0 -0
- package/public/images/xray.svg.gz +0 -0
- package/public/images/zzz.svg.gz +0 -0
- package/public/mstile-144x144.png.gz +0 -0
- package/public/mstile-150x150.png.gz +0 -0
- package/public/mstile-310x150.png.gz +0 -0
- package/public/mstile-310x310.png.gz +0 -0
- package/public/mstile-70x70.png.gz +0 -0
- package/public/safari-pinned-tab.svg.gz +0 -0
- package/public/sw.js +5 -0
- package/server/bin/install-codec-tools.sh +48 -0
- package/server/sudoers.d/photostructure-codec-install +18 -0
- package/tools/README.md +23 -0
- package/tools/build.sh +30 -0
- package/tools/download-rg.sh +61 -0
- package/tools/license-overrides/photostructure-sqlite-vec-MIT.txt +21 -0
- package/tools/licenses/d3-color-difference/LICENSE.txt +29 -0
- package/tools/licenses/deep-eql/LICENSE.txt +21 -0
- package/tools/licenses/exiftool/{license.txt → LICENSE.txt} +140 -140
- package/tools/licenses/fft.js/LICENSE.txt +9 -0
- package/tools/licenses/libjpeg-turbo/LICENSE.md +7 -16
- package/tools/licenses/libraw/COPYRIGHT.txt +27 -0
- package/tools/licenses/moveable-type/LICENSE.txt +6 -0
- package/tools/licenses/noto-emoji/LICENSE.txt +201 -0
- package/tools/licenses/sharp-phash/LICENSE.txt +21 -0
- package/tools/licenses/{twemoji → type-detect}/LICENSE.txt +1 -1
- package/tools/linux-arm64/dcraw_emu +0 -0
- package/tools/linux-arm64/jpegtran +0 -0
- package/tools/linux-arm64/raw-identify +0 -0
- package/tools/linux-arm64/rg +0 -0
- package/tools/linux-arm64/sqlite3 +0 -0
- package/tools/linux-x64/dcraw_emu +0 -0
- package/tools/linux-x64/jpegtran +0 -0
- package/tools/linux-x64/raw-identify +0 -0
- package/tools/linux-x64/rg +0 -0
- package/tools/linux-x64/sqlite3 +0 -0
- package/tools/mac-arm64/dcraw_emu +0 -0
- package/tools/mac-arm64/jpegtran +0 -0
- package/tools/mac-arm64/jpegtran-README.md +31 -0
- package/tools/mac-arm64/libraw-README.md +42 -0
- package/tools/mac-arm64/raw-identify +0 -0
- package/tools/mac-arm64/rg +0 -0
- package/tools/mac-arm64/sqlite3 +0 -0
- package/tools/mac-arm64/sqlite3-README.md +35 -0
- package/tools/mac-x64/dcraw_emu +0 -0
- package/tools/mac-x64/jpegtran +0 -0
- package/tools/mac-x64/jpegtran-README.md +30 -0
- package/tools/mac-x64/libraw-README.md +52 -0
- package/tools/mac-x64/raw-identify +0 -0
- package/tools/mac-x64/rg +0 -0
- package/tools/mac-x64/sqlite3 +0 -0
- package/tools/mac-x64/sqlite3-README.md +6 -0
- package/tools/win-x64/dcraw_emu.exe +0 -0
- package/tools/{win-ia32/jpegtran → win-x64}/jpegtran.exe +0 -0
- package/tools/{win-ia32/jpegtran → win-x64}/libjpeg-62.dll +0 -0
- package/tools/win-x64/libraw-README.md +6 -0
- package/tools/win-x64/libraw.dll +0 -0
- package/tools/win-x64/raw-identify.exe +0 -0
- package/tools/win-x64/recycle-bin-README.md +3 -0
- package/tools/win-x64/recycle-bin.exe +0 -0
- package/tools/win-x64/rg.exe +0 -0
- package/tools/win-x64/sqlite3-README.md +4 -0
- package/tools/win-x64/sqlite3.exe +0 -0
- package/views/_fouc-prevention.ejs +13 -0
- package/views/error.ejs +64 -0
- package/views/eula.html +57 -0
- package/views/settings.ejs +958 -0
- package/views/spa.ejs +54 -0
- package/views/splash.ejs +30 -0
- package/views/welcome-tools.ejs +201 -0
- package/views/welcome.ejs +89 -0
- package/app/info.js +0 -3
- package/app/logtail.js +0 -3
- package/app/main.js +0 -3
- package/app/sync-file.js +0 -3
- package/app/sync.js +0 -3
- package/app/web.js +0 -3
- package/migrations/models/20181030_models.sql +0 -145
- package/migrations/models/20190417_rotation.sql +0 -1
- package/migrations/models/20190425_merged_assets.sql +0 -10
- package/migrations/models/20190426_lowercase_psnet_hostname.sql +0 -1
- package/migrations/models/20190522_on_new_exif_uid.sql +0 -1
- package/migrations/models/20190729_on_new_exif_uid.sql +0 -1
- package/migrations/models/20190730_session.sql +0 -6
- package/migrations/stats/20181030_stats.sql +0 -16
- package/migrations/stats/20190312_files_not_bytes.sql +0 -23
- package/migrations/stats/20190515_rebuild_queue.sql +0 -21
- package/public/app/latest.js.gz +0 -0
- package/public/fonts/roboto-mono-v5-latin-regular.woff.gz +0 -0
- package/public/fonts/roboto-mono-v5-latin-regular.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-300.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-300.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-500.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-500.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-700.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-700.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-900.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-900.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-italic.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-italic.woff2.gz +0 -0
- package/public/fonts/roboto-v18-latin-regular.woff.gz +0 -0
- package/public/fonts/roboto-v18-latin-regular.woff2.gz +0 -0
- package/public/images/128.png.gz +0 -0
- package/public/images/256-gradient.png +0 -0
- package/public/images/256-gradient.png.gz +0 -0
- package/public/images/256.png.gz +0 -0
- package/public/images/64.png.gz +0 -0
- package/public/images/bg.svg.gz +0 -0
- package/public/images/bg10.jpg.gz +0 -0
- package/public/images/blue-splash-1024w.png.gz +0 -0
- package/public/images/blue-tri-bg.svg.gz +0 -0
- package/public/images/boom.svg.gz +0 -0
- package/public/images/dark-cyan-fuschia-bg.svg.gz +0 -0
- package/public/images/fit.svg.gz +0 -0
- package/public/images/light-cyan-fuschia-bg.svg.gz +0 -0
- package/public/images/line-logo-top-cuts-filled.svg.gz +0 -0
- package/public/images/line-logo-top-cuts.svg.gz +0 -0
- package/public/images/link.svg.gz +0 -0
- package/public/images/logo-gradient-gloss-sq.svg.gz +0 -0
- package/public/images/logo-gradient.svg +0 -1
- package/public/images/logo-icon-path.svg.gz +0 -0
- package/public/images/logo-text-path.svg.gz +0 -0
- package/public/images/logo-text-white.svg.gz +0 -0
- package/public/images/navigate_prev.svg.gz +0 -0
- package/public/images/no-entry.svg.gz +0 -0
- package/public/images/phone.svg.gz +0 -0
- package/public/images/private.svg.gz +0 -0
- package/public/images/profile.svg.gz +0 -0
- package/public/images/public.svg.gz +0 -0
- package/public/images/show-in-folder-black.svg.gz +0 -0
- package/public/images/show-in-folder.svg.gz +0 -0
- package/public/images/shrug.svg.gz +0 -0
- package/public/images/splash-1024w.png +0 -0
- package/public/images/splash-1024w.png.gz +0 -0
- package/public/images/splash-512w.png +0 -0
- package/public/images/splash-512w.png.gz +0 -0
- package/public/images/splash-blue.svg +0 -1
- package/public/images/splashbg01-1024w.jpg +0 -0
- package/public/images/splashbg01-1024w.jpg.gz +0 -0
- package/public/images/splashbg02-1024w.jpg +0 -0
- package/public/images/splashbg02-1024w.jpg.gz +0 -0
- package/public/images/text-logo-blue.svg.gz +0 -0
- package/public/images/transparent-white.svg.gz +0 -0
- package/public/images/trash.svg.gz +0 -0
- package/public/release-notes.html +0 -581
- package/public/splash.html +0 -360
- package/tools/licenses/dcraw/dcraw.txt +0 -24
- package/tools/licenses/vue-my-dropdown/LICENSE.txt +0 -19
- package/tools/linux-arm/dcraw/dcraw +0 -0
- package/tools/linux-arm/dcraw/install.sh +0 -5
- package/tools/linux-arm/jpegtran/README.md +0 -11
- package/tools/linux-arm/jpegtran/jpegtran +0 -0
- package/tools/linux-arm/sqlite3/sqlite3 +0 -0
- package/tools/linux-ia32/sqlite3/sqlite3 +0 -0
- package/tools/linux-x64/dcraw/dcraw +0 -0
- package/tools/linux-x64/jpegtran/jpegtran +0 -0
- package/tools/mac-x64/dcraw/dcraw +0 -0
- package/tools/mac-x64/dcraw/install.sh +0 -8
- package/tools/mac-x64/jpegtran/jpegtran +0 -0
- package/tools/mac-x64/sqlite3/README.md +0 -33
- package/tools/mac-x64/sqlite3/sqlite3 +0 -0
- package/tools/win-ia32/dcraw/README.md +0 -30
- package/tools/win-ia32/dcraw/dcraw.exe +0 -0
- 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 @@
|
|
|
1
|
+
DROP TABLE IF EXISTS Task;
|
|
@@ -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,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;
|