Ensure we have no duplicate ap ids.

This commit is contained in:
Roger Braun 2017-05-01 14:54:58 +02:00
parent d187a4965f
commit 2f093db051

View file

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