Migrations: Create index after filling up the db.
This commit is contained in:
parent
0ff1985304
commit
0d7109254b
@ -5,7 +5,5 @@ defmodule Pleroma.Repo.Migrations.AddApIdColumnToObjects do
|
||||
alter table(:objects) do
|
||||
add :ap_id, :string
|
||||
end
|
||||
|
||||
create unique_index(:objects, [:ap_id])
|
||||
end
|
||||
end
|
||||
|
@ -3,5 +3,6 @@ defmodule Pleroma.Repo.Migrations.FillObjectApIdField do
|
||||
|
||||
def change do
|
||||
execute("update objects set ap_id = data->>'id'")
|
||||
create unique_index(:objects, [:ap_id])
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user