mirror of
https://github.com/multica-ai/multica.git
synced 2026-06-17 11:48:42 +02:00
CI uses pgvector/pgvector:pg17 which doesn't ship pg_bigm. Wrap CREATE EXTENSION and index creation in DO/EXCEPTION blocks so the migration succeeds without pg_bigm — indexes are skipped and search falls back to plain LIKE scans. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
10 lines
322 B
SQL
10 lines
322 B
SQL
-- GIN index on comment content for LIKE '%keyword%' queries (pg_bigm).
|
|
-- Only created when pg_bigm is installed.
|
|
DO $$
|
|
BEGIN
|
|
CREATE INDEX idx_comment_content_bigm ON comment USING gin (content gin_bigm_ops);
|
|
EXCEPTION WHEN OTHERS THEN
|
|
RAISE NOTICE 'skipping bigram index on comment (pg_bigm not installed)';
|
|
END
|
|
$$;
|