fix migration

This commit is contained in:
Pierre Ducroquet 2024-02-28 16:16:30 +01:00
parent 768174fb85
commit a65955161e
1 changed files with 2 additions and 1 deletions

View File

@ -1579,7 +1579,7 @@ def do_global_views(conn, cur):
% (name, category.id)
)
init_search_tokens_triggers(cur)
init_search_tokens(cur)
def clean_global_views(conn, cur):
@ -1703,6 +1703,7 @@ def init_search_tokens(conn=None, cur=None):
init_search_tokens_data(cur)
# Index at the end, small performance trick... not that useful, but it's free...
cur.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;")
cur.execute("CREATE INDEX IF NOT EXISTS wcs_search_tokens_trgm ON wcs_search_tokens USING gin(token gin_trgm_ops);")
# And last: functions to use this brand new table