2019-10-08 05:57:28 -04:00
|
|
|
defmodule Pleroma.Repo.Migrations.FillObjectApIdField do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
|
|
|
execute("update objects set ap_id = data->>'id'")
|
2019-10-09 10:55:58 -04:00
|
|
|
create unique_index(:objects, [:ap_id])
|
2019-10-08 05:57:28 -04:00
|
|
|
end
|
|
|
|
end
|