Commit c988a2f 1 parent 76d4f42 commit c988a2f Copy full SHA for c988a2f
File tree 1 file changed +17
-1
lines changed
packages/adapter-postgres
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 10
10
-- DROP TABLE IF EXISTS rooms CASCADE;
11
11
-- DROP TABLE IF EXISTS accounts CASCADE;
12
12
13
+ -- Create extensions schema first
14
+ CREATE SCHEMA IF NOT EXISTS extensions;
15
+
16
+ DO $$
17
+ BEGIN
18
+ IF NOT EXISTS (
19
+ SELECT 1
20
+ FROM pg_extension
21
+ WHERE extname = ' vector'
22
+ ) THEN
23
+ CREATE EXTENSION vector
24
+ SCHEMA extensions;
25
+ END IF;
26
+ END $$;
13
27
14
- CREATE EXTENSION IF NOT EXISTS vector;
15
28
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
16
29
30
+ -- Add extensions schema to search path
31
+ SET search_path TO public, extensions;
32
+
17
33
-- Create a function to determine vector dimension
18
34
CREATE OR REPLACE FUNCTION get_embedding_dimension ()
19
35
RETURNS INTEGER AS $$
You can’t perform that action at this time.
0 commit comments