Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
507B

  1. defmodule Pleroma.Repo.Migrations.UsersAddInboxes do
  2. use Ecto.Migration
  3. def up do
  4. alter table(:users) do
  5. add_if_not_exists(:inbox, :text)
  6. add_if_not_exists(:shared_inbox, :text)
  7. end
  8. execute("UPDATE users SET inbox = source_data->>'inbox'")
  9. execute("UPDATE users SET shared_inbox = source_data->'endpoints'->>'sharedInbox'")
  10. end
  11. def down do
  12. alter table(:users) do
  13. remove_if_exists(:inbox, :text)
  14. remove_if_exists(:shared_inbox, :text)
  15. end
  16. end
  17. end