1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 02:49:18 +00:00

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