From e6bca1457c1a25e0e4882d1159849b14166d00c2 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 24 Mar 2026 16:47:16 -0400 Subject: [PATCH] fix: add pg_trgm extension to database schema Adds pg_trgm extension to enable GIN indexes for fuzzy text search functionality. This extension provides trigram matching required by word_similarity() function used in unified search. Resolves container startup failures when GIN indexes with gin_trgm_ops are created without the extension being loaded. --- database/schema/schema.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database/schema/schema.sql b/database/schema/schema.sql index cc76221..7e24e57 100644 --- a/database/schema/schema.sql +++ b/database/schema/schema.sql @@ -1,6 +1,9 @@ -- Consolidated Bookhoard Database Schema -- This file contains the complete current schema for the Bookhoard media library management system +-- Create extensions for full-text search and fuzzy matching +CREATE EXTENSION IF NOT EXISTS pg_trgm; + -- Create library types table CREATE TABLE IF NOT EXISTS library_types ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(),