fix
gitea/wcs/pipeline/head There was a failure building this commit Details

This commit is contained in:
Pierre Ducroquet 2024-03-04 10:56:24 +01:00
parent 3378c21e1a
commit fcfbf36450
1 changed files with 4 additions and 2 deletions

View File

@ -1775,8 +1775,10 @@ def init_search_tokens_data(cur):
# abort table data initialization if tokens table doesn't exist yet
return
cur.execute("INSERT INTO wcs_search_tokens SELECT unnest(tsvector_to_array(fts)) FROM wcs_all_forms ON CONFLICT(token) DO NOTHING;")
cur.execute("INSERT INTO wcs_search_tokens SELECT unnest(tsvector_to_array(fts)) FROM searchable_formdefs ON CONFLICT(token) DO NOTHING;")
if _table_exists(cur, 'wcs_all_forms'):
cur.execute("INSERT INTO wcs_search_tokens SELECT unnest(tsvector_to_array(fts)) FROM wcs_all_forms ON CONFLICT(token) DO NOTHING;")
if _table_exists(cur, 'searchable_formdefs'):
cur.execute("INSERT INTO wcs_search_tokens SELECT unnest(tsvector_to_array(fts)) FROM searchable_formdefs ON CONFLICT(token) DO NOTHING;")
def purge_obsolete_search_tokens(cur=None):
own_cur = False