Build the index concurrently.
authorlain <lain@soykaf.club>
Wed, 9 Jan 2019 15:55:05 +0000 (16:55 +0100)
committerlain <lain@soykaf.club>
Wed, 9 Jan 2019 15:55:05 +0000 (16:55 +0100)
priv/repo/migrations/20190109152453_add_visibility_function.exs

index 6c94f1bb372adf9f6c58d559d802b0b9cfccfe68..3aadabcd7ff0edf853ca185c8d5edfa396c78dd0 100644 (file)
@@ -1,5 +1,6 @@
 defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
   use Ecto.Migration
+  @disable_ddl_transaction true
 
   def up do
     definition = """
@@ -29,7 +30,8 @@ defmodule Pleroma.Repo.Migrations.AddVisibilityFunction do
 
     create(
       index(:activities, ["activity_visibility(actor, recipients, data)"],
-        name: :activities_visibility_index
+        name: :activities_visibility_index,
+        concurrently: true
       )
     )
   end