Updating the username in LDAP or in Confluence does not reflect the changes in the UI or in the database when the Personal Space was created before the username changes.
- Create one user(gviana).
- Create the Personal Space.
- The SpaceKey will be "~gviana".
- Update the username to "gvianabr".
- Go to the Personal Space of this user.
If you check the "spaces" table, the spacekey will remain "~gviana" and the only option to update it is through an UPDATE statement.
Confluence should have one option to update the SpaceKey if you are the space's owner.
Suggestion raised from https://jira.atlassian.com/browse/CONFSERVER-34386 since that ticket was raised 6 years ago.