How to change the creator of a space?
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
The owner/creator of a Space cannot be modified through the Confluence UI. If a user wishes to change this information, we must do so by querying the database and updating the information there.
Environment
7.2.2 and above
Solution
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Identify the user_key of the user we wish to make the owner.
Identify the lowerspacekey for the space that we wish to update.
Perform an Update command against the database using the user_key and lowerspacekey.
1. Find user_key
To obtain the user_key, run the following query against the database, replacing <username> with the actual username:
1
SELECT user_key FROM user_mapping WHERE username = ‘<username>’;
Copy and store the value that's returned from this query.
2. Find lowerspacekey
To obtain the lowerspacekey, run the following query against the database, replacing <Space name> with the actual space name:
1
SELECT lowerspacekey FROM SPACES where spacename=‘<space name>’;
Copy and store the value that's returned from this query.
3. Update the database
Once we have both of the keys, we'll use them to update the database and change the creator of the Space. Run the following query against the database, replacing <user_key> and <lowerspacekey> with the values we obtained in the previous queries for each.
1
UPDATE SPACES set creator=‘<user_key>’ WHERE lowerspacekey=‘<lowerspacekey>’;
Finally, we'll need to flush the cache from within the Confluence UI. Navigate to Cog> *General Configuration* > Administration > Cache Management and click on 'Flush All’.
Was this helpful?