about summary refs log tree commit diff
path: root/migrations/2018-05-01-141548_add-users/up.sql
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-05-01T18·00+0200
committerVincent Ambo <github@tazj.in>2018-05-01T22·33+0200
commit02c15f06d6f7864431d22a07bda8a36d8bc30474 (patch)
tree94d2e7b3ba912d61b0243811bcaa868238208969 /migrations/2018-05-01-141548_add-users/up.sql
parent2159c76ca70df8e2aed7a7b9d7bce5b16a2485f0 (diff)
fix(migrations): Fix search index creation in user migration
Diffstat (limited to 'migrations/2018-05-01-141548_add-users/up.sql')
-rw-r--r--migrations/2018-05-01-141548_add-users/up.sql2
1 files changed, 2 insertions, 0 deletions
diff --git a/migrations/2018-05-01-141548_add-users/up.sql b/migrations/2018-05-01-141548_add-users/up.sql
index bb358f47b537..222afc485afe 100644
--- a/migrations/2018-05-01-141548_add-users/up.sql
+++ b/migrations/2018-05-01-141548_add-users/up.sql
@@ -68,6 +68,8 @@ CREATE MATERIALIZED VIEW search_index AS
     JOIN users ta ON ta.id = t.author
     JOIN users pa ON pa.id = p.author;
 
+CREATE INDEX idx_fts_search ON search_index USING gin(document);
+
 -- And drop the old fields:
 ALTER TABLE posts DROP COLUMN author_name;
 ALTER TABLE posts DROP COLUMN author_email;