Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -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