For Confluence 5.2 and above
To change the creator of a specific page
Run this SQL query against your database, replacing these values:
- <lowerusername> with the username of the new creator in lower case
- ‘the title of the page’ with the page title (case sensitive)
- <thespacekey> with the spacekey in uppercase
update content set creator = ( select user_key from user_mapping where lower_username = '<lowerusername>' ) where contentid in ( select c2.contentid from content c2 where c2.title = 'the title of the page' and spaceid = ( select spaceid from spaces where spacekey = '<thespacekey>' )) or prevver in ( select c2.contentid from content c2 where c2.title = 'the title of the page' and spaceid = ( select spaceid from spaces where spacekey = '<thespacekey>' )); |
To replace all content created by a single user
Run this SQL query against your database, replacing these values:
- <newlowerusername> with the username of the new creator in lower case
- <oldlowerusername> with the username of the old creator in lower case
update content set creator = ( select user_key from user_mapping where lower_username = '<newlowerusername>' ) where creator = ( select user_key from user_mapping where lower_username = '<oldlowerusername>' ); |