diff options
Diffstat (limited to 'priv/repo/migrations')
3 files changed, 31 insertions, 0 deletions
| 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 new file mode 100644 index 000000000..96af412f0 --- /dev/null +++ b/priv/repo/migrations/20180829082446_add_recipients_to_and_cc_fields_to_activities.exs @@ -0,0 +1,13 @@ +defmodule Pleroma.Repo.Migrations.AddRecipientsToAndCcFieldsToActivities do +  use Ecto.Migration + +  def change do +    alter table(:activities) do +      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) +  end +end diff --git a/priv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs b/priv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs new file mode 100644 index 000000000..f6c622e3e --- /dev/null +++ b/priv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs @@ -0,0 +1,8 @@ +defmodule Pleroma.Repo.Migrations.ActivitiesAddToCcIndices do +  use Ecto.Migration + +  def change do +    create index(:activities, ["(data->'to')"], name: :activities_to_index, using: :gin) +    create index(:activities, ["(data->'cc')"], name: :activities_cc_index, using: :gin) +  end +end diff --git a/priv/repo/migrations/20180829183529_remove_recipients_to_and_cc_fields_from_activities.exs b/priv/repo/migrations/20180829183529_remove_recipients_to_and_cc_fields_from_activities.exs new file mode 100644 index 000000000..ed4f5af30 --- /dev/null +++ b/priv/repo/migrations/20180829183529_remove_recipients_to_and_cc_fields_from_activities.exs @@ -0,0 +1,10 @@ +defmodule Pleroma.Repo.Migrations.RemoveRecipientsToAndCcFieldsFromActivities do +  use Ecto.Migration + +  def change do +    alter table(:activities) do +      remove :recipients_to +      remove :recipients_cc +    end +  end +end | 
