Actually make index unique.

This commit is contained in:
Roger Braun 2017-05-01 15:42:05 +02:00
parent 2f093db051
commit b9d1fc05b2

View File

@ -0,0 +1,10 @@
defmodule Pleroma.Repo.Migrations.AddIdContraintsToActivitiesAndObjectsPartTwo do
use Ecto.Migration
def change do
drop index(:objects, ["(data->>\"id\")"], name: :objects_unique_apid_index)
drop index(:activities, ["(data->>\"id\")"], name: :activities_unique_apid_index)
create unique_index(:objects, ["(data->>'id')"], name: :objects_unique_apid_index)
create unique_index(:activities, ["(data->>'id')"], name: :activities_unique_apid_index)
end
end