| >Is there any special trick to such script? Provided some pointers of | >what the script should do, I wouldn't mind writing and testing it. | | There are lots of special tricks to such a script. Otherwise, I would | have written it already. :) Obviously. /me slaps his forehead | OK, here's how I think it needs to happen, with some, hopefuly helpful | notes. | | 1. The script needs to be run under Zope 2.6 or 2.7. There should | be a product that people can install that installs some method to | be run. People should be able to run this method in a running zope. | They should not need to shut down their site to do the conversion. | | 2. The method should walk the object tree, converting: | | - old-style BTrees to modern BTrees | - old-style buckets to modern buckets | - intSets to IITreeSets. Just to check: +----------+-----------+ | Old | New | +----------+-----------+ | BTree | OOBTree | +----------+-----------+ | IIBTree | IIBtree | +----------+-----------+ | OIBTree | OIBTree | +----------+-----------+ | IOBTree | IOBTree | +----------+-----------+ | intSet | IITreeSet | +----------+-----------+ | bucket? | bucket? | +----------+-----------+ | The individual conversions should be pretty simple. At worst involving | a for loop, but, in many cases, the constructors for the new types will | be able to accept the old types. | | 3. The hard part is walking the object tree. You will need a function that, | given an object, will return the oids of the objects it references. | Perhaps Jeremy can help you with that. I hope so *wink*. | 4. You should do each conversion in a separate transaction. That is, when | you | encounter an object that needs to be converted, you should convert it | and commit. | | 5. You will want to keep a dictionary of the oids visited, just in case | there are | any cyles. Also, if you encounter an oid that was converted, you will | need to | subtitute the new value. This might be really hard. :( I think this | probably | won't happen, but perhaps you should at least check for it. | | 6. After the conversion has been run, the database should be usable with | the head. Kewl. I'm eager to get my hands on it. -- Sidnei da Silva <sidnei@awkly.org> http://awkly.org - dreamcatching :: making your dreams come true http://plone.org/about/team#dreamcatcher Somebody's terminal is dropping bits. I found a pile of them over in the corner.