MUST be pub.versia:migration/Migration.
Migration Extension
The migration extension moves an account’s subscribers and the users it is subscribed to to a new account. Notes and other entities stay where they are.
Definition
Migration
- Type
"pub.versia:migration/Migration"- Lifetime
- Transient Entity
Fields
Inherited from Entity: created_at, extensions
created_atRFC3339 RequiredextensionsExtensions
{
"type": "pub.versia:migration/Migration",
"author": "example.com:034syrr1jc002",
"created_at": "2021-01-01T00:00:00Z",
"destination": "other.example:0338qkp85w001"
}User Extensions
The following extensions to User are used by the migration extension:
- Extension ID
pub.versia:migration- Extends
- User
Fields
If this user is migrating or has migrated from another instance, this property MUST be a Reference to the user on the previous instance.
If this user has migrated to another instance, this property MUST be a Reference to the user on the new instance.
{
// ...
"type": "User",
// ...
"extensions": {
"pub.versia:migration": {
"previous": "old.example:034syrr1jc002"
// "destination": "new.example:0338qkp85w001"
}
}
}Behavior
Migration happens in three steps:
Prepare the New Account
The user creates an account on the new instance, and sets its previous field to a Reference to the old account.
Request Migration
The user requests migration from the old instance. The old instance checks that the new account’s previous field names the old account, and sends a Migration entity.
It MUST deliver the Migration to the instances hosting a subscriber of the old account or a user it is subscribed to, and to the new account’s instance. It MAY also deliver it to others.
A receiver MUST fetch the destination account, and MUST ignore the Migration if that account’s previous field does not name the author.
Subscriptions then move through normal Subscribes:
- An instance hosting a subscriber of the old account MUST send a Subscribe to the new account for each of them, and drop their subscription to the old account.
- The new account’s instance SHOULD accept these Subscribes automatically, even if the account has
manually_approves_subscribersset. - The new account’s instance MUST send a Subscribe to each account in the old account’s
subscriptionscollection. The target’s usual rules apply, so one who manually approves subscribers still decides.
Complete Migration
The old instance sets the destination field of the old account to a Reference to the new account, and disables the old account.
It SHOULD keep serving the old account and its subscribers and subscriptions collections for at least 30 days, so that other instances can finish moving.
A domain handle moves when the user changes its DNS record or file to name the new account.