Account migration on same instance

Hello! I would like to change my username but remain on the same instance. My understanding is the best way to do this is to migrate the user.

  1. The documentation seems sparse; what’s the correct flow for migrating from one account to another?
  2. Since I’m staying on the same instance, is there a way I can keep my posts? E.g. via DB surgery or through some other method?

Thanks :3

sadly keeping your posts isn’t possible, since your username is baked into your activitypub addressing - but theoretically migration on the same instance should just work the same as going to a remote one

oh and for the record, the process is

  1. on the NEW account:
    go into settings → security → add an alias - point to the OLD account, i.e a@b.com

  2. on the OLD account:

settings → security, move account -enter the NEW account

This is a little unfortunate, I would really like to migrate the posts so I can get rid of my old username completely.

I realize I could write a script to repost all of my posts to the new account, but then the timestamps would be wrong. Is there a way I could use DB surgery to add the posts to the DB and prevent the server from pushing these posts out? Then they could be backdated correctly and hopefully wouldn’t break federation.

Just wanted to give this a friendly bump. Is it going to break things on the Akkoma side if I do this? Seems like federation should be okay as long as the new account doesn’t have any followers when I make all the posts. I’ve started modifying my Akkoma to allow retroposting (though I know that should be done with caution); just wondering if internally it’s going to cause issues since the posts won’t be chronologically ordered anymore (across different accounts - on every individual account posts will still be ordered correctly)

as said on IRC before regarding DB surgery to change post attribution:

you can in theory do that (replacing the actor and attributedTo fields in all activities and objects), but it might confuse remotes which already knew those posts leading to various issues and it’s definitely not a standard, supported operation
so feel free to try, but you’ll be on your own

If you automate the creation of new posts instead and do not care about loosing replies from others to your posts, likes, repeats, etc there probably won’t be an issue wrt to database consistency and the ActivityPub protocol itself, since they are just new posts. Buttimestamps will be off or if just naively adapting timestamps ordering in API requests as you noticed.

Apart from replies from others to your old posts, replies you made to posts from others will also need special consideration and/or be semi-broken. You also don’t want to flood other isntances with requests when creating those posts and just not being followed by anyone isn’t enough due to replies. But at east this last problem can be easily solved by temporarily turning off federation.

This is not a standard, supported operation with depending on what you want more or less, but never zero potential pitfalls and is not something I have the time or want to guide anyone through the details.
You’re welcome to try it out, but you’ll be on your own.

Thanks! Yeah I vaguely recall asking on IRC though this is a slightly different case with the copy vs move.

So it sounds like something like this is definitely not upstreamable, eh? I’m planning to bolt it onto the CLI - basically copy the posts from one user to another, and not pushing those posts out (and allow allowing it for accounts with no posts).

I’m planning to set the timestamps and just ensure that the posts are created in order.

I haven’t decided exactly what I’m going to do for replies yet. I’d like to keep them if possible, but then of course it means replies to those will be pointing at the wrong post.