Skip to content
Snippets Groups Projects
  1. Mar 09, 2024
  2. Mar 05, 2024
    • Sheogorath's avatar
      fix(immich): Adjust database to use pgvector · 79caa71a
      Sheogorath authored
      BREAKING CHANGE: This commit require manual adjustments of the database.
      
      ```
      DROP SCHEMA vectors CASCASE;
      DROP EXTENSION vectors;
      
      TRUNCATE TABLE smart_search;
      TRUNCATE TABLE asset_faces CASCADE;
      TRUNCATE TABLE person;
      
      ALTER TABLE smart_search
      ADD COLUMN IF NOT EXISTS embedding vector(512); -- need to change the number here if using a non-default CLIP model
      
      ALTER TABLE asset_faces
      ADD COLUMN IF NOT EXISTS embedding vector(512);
      
      SET vectors.pgvector_compatibility=on;
      
      CREATE INDEX IF NOT EXISTS clip_index ON smart_search
          USING hnsw (embedding vector_cosine_ops)
          WITH (ef_construction = 300, m = 16);
      
      CREATE INDEX IF NOT EXISTS face_index ON asset_faces
          USING hnsw (embedding vector_cosine_ops)
          WITH (ef_construction = 300, m = 16);
      ```
      
      Reference:
      https://github.com/immich-app/immich/discussions/7310#discussioncomment-8559595
      79caa71a
  3. Feb 29, 2024
  4. Feb 08, 2024
  5. Feb 04, 2024
  6. Feb 03, 2024
  7. Dec 09, 2023
  8. Nov 30, 2023
  9. Nov 25, 2023
  10. Nov 22, 2023
  11. Nov 18, 2023
  12. Nov 14, 2023
  13. Nov 08, 2023
  14. Nov 02, 2023
  15. Oct 29, 2023
Loading