Export/Import user (aka "migrate") #2868
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preliminary work on an Export/Import flow for users
This is very preliminary and subject to change, potentially in major ways.
Intended to resolve #1012
Users can export a JSON file and import the file into another instance.
Uses
serializers.serialize
so this is just a straight Django dump, not an ActivityPub JSON format.Book
andEdition
objects) and their authorsReview
andStatus
objects)Related future work
We will also need a way to indicate in the old instance that the user has moved. I am anticipating we'll do that in a separate PR, using a
Move
ActivityPub action similar to how Mastodon does it ("Alice hasMove
d Alice to Bob") but also possiblyMove
ing book lists.Exclusions
Group
s are not currently ActivityPub-aware objects, I have excluded them, though in future these need to be ActivityPub objects and therefore included. Not this also means we should flip any Group curated lists back to default. i.e. Groups can only exist between users who are all local users.