Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
-- 04/vector-store: enable the pgvector extension on the application database.
|
||||
--
|
||||
-- This is the foundation for `packages/vector-store`'s pgvector adapter. Each
|
||||
-- collection lives in its own table named `vec_<namespace>_<collection>` with
|
||||
-- a `vector(<dim>)` column plus HNSW + GIN + tenant-id indexes. The tables are
|
||||
-- created on demand at runtime by the adapter (`createCollection`); only the
|
||||
-- extension itself is provisioned here so the rest of the migration history
|
||||
-- stays free of dynamic vector-table churn.
|
||||
--
|
||||
-- Notes for operators:
|
||||
-- * `CREATE EXTENSION` requires superuser privileges. On managed Postgres
|
||||
-- (RDS, Supabase, Neon, …) the extension is typically pre-allowlisted and
|
||||
-- this statement is idempotent.
|
||||
-- * Self-hosted Postgres needs the pgvector binaries installed
|
||||
-- (`apt install postgresql-16-pgvector` or the `pgvector/pgvector:pg16`
|
||||
-- Docker image used in CI). If the binaries are missing, the migration
|
||||
-- fails fast — preferable to silent breakage when the first `createCollection`
|
||||
-- call runs.
|
||||
-- * Rollback drops the extension via `DROP EXTENSION IF EXISTS vector CASCADE`;
|
||||
-- CASCADE destroys every `vec_*` table, so back up before reverting.
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS vector;
|
||||
Reference in new issue
Block a user