logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 1a70d41f8e7ce0eb30242d58077b69816e443c10
parent: 29b5e30c465ccb29465156d66eba02e6c0ef846f
Author: William Pitcock <nenolod@dereferenced.org>
Date:   Wed, 29 Aug 2018 18:38:51 +0000

migrations: add index creation migration and recipients_to/cc removal migration

Diffstat:

Apriv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs8++++++++
Apriv/repo/migrations/20180829183529_remove_recipients_to_and_cc_fields_from_activities.exs10++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/priv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs 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 @@ -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