pleroma/priv/repo/migrations/20191007160755_fill_object_ap_id_field.exs

9 lines
203 B
Elixir
Raw Normal View History

defmodule Pleroma.Repo.Migrations.FillObjectApIdField do
use Ecto.Migration
def change do
execute("update objects set ap_id = data->>'id'")
create unique_index(:objects, [:ap_id])
end
end