From 1a70d41f8e7ce0eb30242d58077b69816e443c10 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 29 Aug 2018 18:38:51 +0000 Subject: [PATCH] migrations: add index creation migration and recipients_to/cc removal migration --- .../20180829182612_activities_add_to_cc_indices.exs | 8 ++++++++ ...ove_recipients_to_and_cc_fields_from_activities.exs | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 priv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs create mode 100644 priv/repo/migrations/20180829183529_remove_recipients_to_and_cc_fields_from_activities.exs 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 -- 2.45.2