"""pg_trgm, for the spelling fallback in AI Mode. "kawasaki criteria" finds fourteen sources; "kawasaki critera" finds none. Neither ranker can catch the second — lexical because the token is in no index, semantic because the embedding of a misspelling is not near the embedding of the word. Trigram similarity puts "Kawasaki disease" at 0.36 with the next article at 0.11, and the gap is what makes it safe to act on. Revision ID: s8c9d0e1f2a3 Revises: r7b8c9d0e1f2 """ from alembic import op revision = "s8c9d0e1f2a3" down_revision = "r7b8c9d0e1f2" branch_labels = None depends_on = None def upgrade(): op.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm") def downgrade(): # Left in place. Dropping an extension another query may since have come # to rely on is a worse outcome than an unused one sitting there. pass