mirror of
https://git.youjo.love/youjo/youjo-be.git
synced 2024-11-20 13:59:55 +01:00
Actually make index unique.
This commit is contained in:
parent
2f093db051
commit
b9d1fc05b2
1 changed files with 10 additions and 0 deletions
|
@ -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
|
Loading…
Reference in a new issue