mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
d182d913c6
Install the PostgreSQL unaccent extension and use a custom immutable wrapper function to perform accent-insensitive ILIKE comparisons when searching for books, authors, series, and narrators. Add database indexes on the unaccented values to maintain query performance. Closes #640
9 lines
423 B
SQL
9 lines
423 B
SQL
-- Initial database setup
|
|
-- Migrations are handled by Drizzle Kit, this file is for any
|
|
-- Postgres extensions or initial configuration needed before migrations run.
|
|
|
|
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
|
CREATE EXTENSION IF NOT EXISTS "pg_trgm"; -- for fuzzy text search
|
|
CREATE EXTENSION IF NOT EXISTS "unaccent"; -- for accent-insensitive search
|
|
CREATE EXTENSION IF NOT EXISTS "vector"; -- for pgvector ANN search
|