a5716855779450ac40758e69a05ac660901b8bdc
[anni] / priv / repo / migrations / 20180829082446_add_recipients_to_and_cc_fields_to_activities.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo.Migrations.AddRecipientsToAndCcFieldsToActivities do
6   use Ecto.Migration
7
8   def change do
9     alter table(:activities) do
10       add(:recipients_to, {:array, :string})
11       add(:recipients_cc, {:array, :string})
12     end
13
14     create_if_not_exists(index(:activities, [:recipients_to], using: :gin))
15     create_if_not_exists(index(:activities, [:recipients_cc], using: :gin))
16   end
17 end