akkoma/priv/repo/migrations/20221020135943_add_nodeinfo.exs
floatingghost b7e8ce2350 Scrape instance nodeinfo (#251)
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/251
2022-11-06 22:49:39 +00:00

17 lines
412 B
Elixir

defmodule Pleroma.Repo.Migrations.AddNodeinfo do
use Ecto.Migration
def up do
alter table(:instances) do
add_if_not_exists(:nodeinfo, :map, default: %{})
add_if_not_exists(:metadata_updated_at, :naive_datetime)
end
end
def down do
alter table(:instances) do
remove_if_exists(:nodeinfo, :map)
remove_if_exists(:metadata_updated_at, :naive_datetime)
end
end
end