Ticket #497 (new Improvement)
Opened 3 years ago
make it possible to change the default namespace of an existing repository
|Reported by:||tb@…||Owned by:||somebody|
[jira2trac import : issue created on June 21, 2007 8:18:40 AM CEST http://issues.cocoondev.org/browse/DSY-497 ]
I would like to change the name (and id) of the default namespace of a daisy repository that already has documents in it, including the namespace of the already existing documents. There are no imported documents or other namespaces present in the repository.
I've nosed around a little and i think this might work:
1) change the "name_" and "fingerprint" values of the existing namespace in the "daisy_namespaces" table in the database;
2) change the default namespace in myconfig.xml
3) change all links in all daisy documents that link to other daisy documents to replace the existing namespace in the link with a new one (the new default namespace)
The links within the existing daisy documents will have to be changed. There is already a docid_convertor tool present for upgrading daisy 1.5 to 2.0, right now it converts all daisy links without a namespace to links with a namespace. I think it would be a relatively small adaptation to make it possible to
run this tool on all documents to change one namespace to another namespace in all daisy links. (i haven't looked at the code)
This way one could change the namespace of a daisy instance at any time if a namespace conflict occurs.
(The only remaining disadvantage would be that all externally saved links would become invalid. But then you could create an apache url
rewrite or possibly implement some sort of deprecated-namespace-redirect in daisy itself to solve that)