Skip to content

Commit

Permalink
Updated dump file so vector extension will enable in postgres if not …
Browse files Browse the repository at this point in the history
…enabled.
  • Loading branch information
blinKAlliance committed Feb 21, 2024
1 parent 70ab058 commit f7bdcd3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/supabase/db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ SET row_security = off;

CREATE SCHEMA IF NOT EXISTS "public";

DO $$
BEGIN
IF NOT EXISTS (
SELECT 1
FROM pg_extension
WHERE extname = 'vector'
) THEN
CREATE EXTENSION vector
SCHEMA extensions;
END IF;
END $$;

ALTER SCHEMA "public" OWNER TO "pg_database_owner";

CREATE OR REPLACE FUNCTION "public"."check_similarity_and_insert"(query_table_name text, query_user_id uuid, query_user_ids uuid[], query_content jsonb, query_room_id uuid, query_embedding extensions.vector, similarity_threshold double precision) RETURNS void
Expand Down

0 comments on commit f7bdcd3

Please sign in to comment.