1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.UsersAddInboxes do
10 add_if_not_exists(:inbox, :text)
11 add_if_not_exists(:shared_inbox, :text)
14 execute("UPDATE users SET inbox = source_data->>'inbox'")
15 execute("UPDATE users SET shared_inbox = source_data->'endpoints'->>'sharedInbox'")
19 alter table(:users) do
20 remove_if_exists(:inbox, :text)
21 remove_if_exists(:shared_inbox, :text)