Skip to content

Commit

Permalink
fix: create extension before using in init sql
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Jan 14, 2025
1 parent 3b4588a commit 5ca37a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions backend/src/db/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ CREATE TABLE IF NOT EXISTS iqps (
fts_course_details tsvector GENERATED ALWAYS AS (to_tsvector('english', course_code || ' ' || course_name)) stored
);
CREATE INDEX IF NOT EXISTS iqps_fts ON iqps USING gin (fts_course_details);
CREATE EXTENSION pg_trgm;
CREATE INDEX IF NOT EXISTS idx_course_name_trgm ON iqps USING gin (course_name gin_trgm_ops);";

/// Query to get similar papers. Matches `course_code` ($1) always. Other parameters are optional and can be enabled or disabled using the arguments to this function.
Expand Down

0 comments on commit 5ca37a1

Please sign in to comment.