Skip deactivated users in followers import
[akkoma] / priv / repo / migrations / 20171109091239_add_actor_to_activity.exs
index bac53972cfb6c778e5f9c0b3a6cda523a0222042..fb5f80c98f61027b5fc9215c1228f3dcece3a9b4 100644 (file)
@@ -8,15 +8,11 @@ defmodule Pleroma.Repo.Migrations.AddActorToActivity do
       add :actor, :string
     end
 
-    execute """
-      update activities set actor = data->>'actor';
-    """
-
     create index(:activities, [:actor, "id DESC NULLS LAST"], concurrently: true)
   end
 
   def down do
-    drop index(:activities, [:actor, "id DESC NULLS LAST"])
+    drop_if_exists index(:activities, [:actor, "id DESC NULLS LAST"])
     alter table(:activities) do
       remove :actor
     end