Add backfilling of posts #846

Open
tudbut wants to merge 21 commits from tudbut/akkoma:develop into develop
Showing only changes of commit ee1f8938fc - Show all commits

View file

@ -4,12 +4,14 @@ defmodule Pleroma.Repo.Migrations.UsersAddOutboxes do
def up do
alter table(:users) do
add_if_not_exists(:outbox, :text)
add_if_not_exists(:last_outbox_fetch, :text)
end
end
tudbut marked this conversation as resolved Outdated

This does not generally hold

This does not generally hold

im aware. but for migrating instances, no outboxes will be populated at first so this is kinda the only solution if you want previously fetched users to have the property

im aware. but for migrating instances, no outboxes will be populated at first so this is kinda the only solution if you want previously fetched users to have the property

any idea how to do this more accurately?

any idea how to do this more accurately?

don’t populate it and wait for the next user refresh to occur or Update activity to arrive filling outbox with the correct value

don’t populate it and wait for the next user refresh to occur or Update activity to arrive filling outbox with the correct value

(also this breaks for e.g. users named "inbox")

(also this breaks for e.g. users named "inbox")
def down do
alter table(:users) do
remove_if_exists(:outbox, :text)
remove_if_exists(:last_outbox_fetch, :naive_datetime)
end
end
end