chore: make vector extension optional for migrations
This commit is contained in:
parent
6685b24239
commit
709f8c3cdf
|
|
@ -1,3 +1,5 @@
|
|||
DO $$
|
||||
BEGIN
|
||||
-- Add migration script here
|
||||
CREATE EXTENSION IF NOT EXISTS vector;
|
||||
|
||||
|
|
@ -15,3 +17,8 @@ CREATE TABLE IF NOT EXISTS af_collab_embeddings
|
|||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS af_collab_embeddings_similarity_idx ON af_collab_embeddings USING hnsw (embedding vector_cosine_ops);
|
||||
|
||||
EXCEPTION WHEN OTHERS THEN
|
||||
RAISE NOTICE 'could not create "vector" extension, ignoring this migration';
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
Loading…
Reference in New Issue