Fixes: chatwoot/product#796 This migration adds a trigram index to the tags table on the name column. This is used to speed up the search for tags by name, this is a heavy sub-query when generating reports where labels are involved. Trigram indexes are used to speed up LIKE queries; they are not used for equality queries. This is because the index is not a btree index, it is a GIN index. This means that the index is not ordered and so cannot be used for equality queries. Read more: https://www.postgresql.org/docs/current/pgtrgm.html The index is created concurrently: https://thoughtbot.com/blog/how-to-create-postgres-indexes-concurrently-in --------- Co-authored-by: Sojan <sojan@pepalo.com>