1 SET client_min_messages TO warning;
3 DROP FUNCTION doc_data_search(text, int, text, bool) CASCADE;
4 DROP FUNCTION news_bytes_search(text, int) CASCADE;
5 DROP FUNCTION artifact_search(text, int) CASCADE;
6 DROP FUNCTION trackers_search(text, int, text, bool) CASCADE;
8 CREATE TRIGGER artifactmessage_ts_update AFTER UPDATE OR INSERT OR DELETE ON artifact_message
9 FOR EACH ROW EXECUTE PROCEDURE update_vectors('artifact_message');
11 DELETE FROM artifact_message_idx;
13 INSERT INTO artifact_message_idx (id, artifact_id, vectors)
14 SELECT id, artifact_id, to_tsvector('default', coalesce(body,'')) AS vectors
15 FROM artifact_message ORDER BY id;