Move files and documets to another project
Like issues, it will be cool to switch document from one project to an other.
If we can do that massively, it will be more cool :)
#7 Updated by Paolo Montrasio over 6 years ago
This would be useful also on new project.
I ofter start with a single wiki page and divide it into more pages as the project goes on and the development team understand which structure is more appropriate for the wiki.
I just created a new page and had to move attachments from the home to there. I googled how to do it and found this feature request.
I eventually did it by changing the container_id attribute in the attachments table.
As a reference, here is what you need to do to move one attachment from one page to another.
select * from projects where identifier = '...'; select * from wikis where project_id = ...; select * from wiki_pages where wiki_id = ... and title = '...'; -- the source page select * from wiki_pages where wiki_id = ... and title = '...'; -- the destination page select * from attachments where container_id = ...; -- the source page id from wiki_pages update attachments set container_id = ... where id = ...; -- the destination page id and the attachment id