aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--priv/repo/migrations/20180829182612_activities_add_to_cc_indices.exs8
-rw-r--r--priv/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
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