Skip to content

Commit 5ca37a1

Browse files
fix: create extension before using in init sql
1 parent 3b4588a commit 5ca37a1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

backend/src/db/queries.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ CREATE TABLE IF NOT EXISTS iqps (
2121
fts_course_details tsvector GENERATED ALWAYS AS (to_tsvector('english', course_code || ' ' || course_name)) stored
2222
);
2323
CREATE INDEX IF NOT EXISTS iqps_fts ON iqps USING gin (fts_course_details);
24+
CREATE EXTENSION pg_trgm;
2425
CREATE INDEX IF NOT EXISTS idx_course_name_trgm ON iqps USING gin (course_name gin_trgm_ops);";
2526

2627
/// 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.

0 commit comments

Comments
 (0)