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

This commit is contained in:
William Pitcock 2018-08-29 18:38:51 +00:00
parent 29b5e30c46
commit 1a70d41f8e
2 changed files with 18 additions and 0 deletions

View File

@ -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

View File

@ -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