so simple fix
gitea/wcs/pipeline/head There was a failure building this commit
Details
gitea/wcs/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
4e228fb3ed
commit
eb175c397e
|
@ -1745,10 +1745,6 @@ def init_search_tokens_triggers(cur):
|
|||
# Instead, a weekly cron job will delete obsolete entries, thus making it sure no
|
||||
# personal data is kept uselessly.
|
||||
|
||||
if not(_table_exists(cur, 'wcs_search_tokens')):
|
||||
# abort trigger creation if tokens table doesn't exist yet
|
||||
return
|
||||
|
||||
# First part: the appending function
|
||||
cur.execute("""CREATE OR REPLACE FUNCTION wcs_search_tokens_trigger_fn ()
|
||||
RETURNS trigger
|
||||
|
@ -1760,6 +1756,10 @@ BEGIN
|
|||
END;
|
||||
$function$;""")
|
||||
|
||||
if not(_table_exists(cur, 'wcs_search_tokens')):
|
||||
# abort trigger creation if tokens table doesn't exist yet
|
||||
return
|
||||
|
||||
if _table_exists(cur, 'wcs_all_forms') and not _trigger_exists(cur, 'wcs_all_forms', 'wcs_all_forms_fts_trg_upd'):
|
||||
# Second part: insert and update triggers for wcs_all_forms
|
||||
cur.execute("CREATE TRIGGER wcs_all_forms_fts_trg_ins AFTER INSERT ON wcs_all_forms FOR EACH ROW WHEN (NEW.fts IS NOT NULL) EXECUTE PROCEDURE wcs_search_tokens_trigger_fn();")
|
||||
|
|
Loading…
Reference in New Issue