Commit Graph
3 Commits
Author SHA1 Message Date
yiling 048028007e feat(db): add HNSW index on asset_embeddings and natural sort collation on assets.name
- Add HNSW index on asset_embeddings.embedding using vector_cosine_ops (m=16,
  ef_construction=64) with hnsw.iterative_scan=relaxed_order for efficient
  filtered ANN queries
- Create ICU numeric collation and alter assets.name column to use it for
  natural sort (file2 < file10 instead of lexicographic ordering)
- Add B-tree index on assets.name with numeric collation for sort performance
- Add schema @@index annotations to match migration index names
- Add 7 tests verifying natural sort behaviour in both AssetService.listChildren
  and SearchService.search (Prisma ORM and raw-SQL paths)
2026-05-29 15:18:31 +08:00
yiling 67b50ab6f0 chore(db): squash all migrations into a single initial migration
- Delete 19 historical migration files and directories

- Generate a new squashed migration 000000000000_squashed_migrations using prisma migrate diff

- Verify that all tests pass cleanly using Testcontainers with the squashed migration
2026-05-29 12:22:58 +08:00
yiling 9cad96210c initial commit 2026-05-19 16:05:09 +08:00