Merge branch 'develop' of https://git.pleroma.social/pleroma/pleroma into develop
[akkoma] / priv / repo / migrations / 20171023155035_add_second_object_index_to_activty.exs
1 defmodule Pleroma.Repo.Migrations.AddSecondObjectIndexToActivty do
2 use Ecto.Migration
3
4 @disable_ddl_transaction true
5
6 def change do
7 drop_if_exists index(:activities, ["(data->'object'->>'id')", "(data->>'type')"], name: :activities_create_objects_index)
8 create index(:activities, ["(coalesce(data->'object'->>'id', data->>'object'))"], name: :activities_create_objects_index, concurrently: true)
9 end
10 end