Merge branch 'develop' into cleanup/drop-subscription-table-if-exists
[akkoma] / priv / repo / migrations / 20190501125843_add_fts_index_to_objects.exs
index 9b274695eb89281db6d04852efc4e8cbc2eaeb74..d4de51691f569d05afb0dc53545bd8dd65ccdfdd 100644 (file)
@@ -3,6 +3,6 @@ defmodule Pleroma.Repo.Migrations.AddFTSIndexToObjects do
 
   def change do
     drop_if_exists index(:activities, ["(to_tsvector('english', data->'object'->>'content'))"], using: :gin, name: :activities_fts)
-    create index(:objects, ["(to_tsvector('english', data->>'content'))"], using: :gin, name: :objects_fts)
+    create_if_not_exists index(:objects, ["(to_tsvector('english', data->>'content'))"], using: :gin, name: :objects_fts)
   end
 end