X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20180829082446_add_recipients_to_and_cc_fields_to_activities.exs;h=4819860396f89ffb271f089ac196063109a4310c;hb=refs%2Fheads%2Fdevelop;hp=96af412f0afbb318c2e3436b1cdb4a491299012c;hpb=b7923aa304c23963fd51731579a54949fa639762;p=akkoma diff --git a/priv/repo/migrations/20180829082446_add_recipients_to_and_cc_fields_to_activities.exs b/priv/repo/migrations/20180829082446_add_recipients_to_and_cc_fields_to_activities.exs index 96af412f0..481986039 100644 --- a/priv/repo/migrations/20180829082446_add_recipients_to_and_cc_fields_to_activities.exs +++ b/priv/repo/migrations/20180829082446_add_recipients_to_and_cc_fields_to_activities.exs @@ -3,11 +3,11 @@ defmodule Pleroma.Repo.Migrations.AddRecipientsToAndCcFieldsToActivities do def change do alter table(:activities) do - add :recipients_to, {:array, :string} - add :recipients_cc, {:array, :string} + add(:recipients_to, {:array, :string}) + add(:recipients_cc, {:array, :string}) end - create index(:activities, [:recipients_to], using: :gin) - create index(:activities, [:recipients_cc], using: :gin) + create_if_not_exists(index(:activities, [:recipients_to], using: :gin)) + create_if_not_exists(index(:activities, [:recipients_cc], using: :gin)) end end