Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-11 Thread Syver Enstad
Tim Peters wrote: [Tim Peters] Stephan Richter was wrestling with a migration script a couple months ago. I don't know whether he packaged the code he ended up with for reuse. Here's a record of the IRC chat in which details got worked out:

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Syver Enstad
Tim Peters wrote: [David Binger] Is there something to prevent your update script from setting _p_changed = 1 on every persistent object that contains a reference to an instance of the moved class? I think that if you do that and commit and pack the database, the old module/class references

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Syver Enstad
Stephan Richter wrote: On Wednesday 09 November 2005 11:00, Tim Peters wrote: Stephan Richter was wrestling with a migration script a couple months ago. I don't know whether he packaged the code he ended up with for reuse. Here's a record of the IRC chat in which details got worked out:

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Syver Enstad
Lennart Regebro wrote: This may not help, but anyway. :) In Zope, I did this: I moved the class to the module I wanted it. I also kept a dummy class in the old place like so: from newplace import class so that the old objects worked. Then I wrote a script to go through the ZODB and recreate

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread David Binger
On Nov 10, 2005, at 5:09 AM, Syver Enstad wrote: Thank you Stefan. I am right if I suppose that the reason this fixes all references is that it saves all persistent objects in the database? Will this also fix references to persistent objects in non persistent objects stored in the

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Syver Enstad
Stephan Richter wrote: On Wednesday 09 November 2005 11:00, Tim Peters wrote: Stephan Richter was wrestling with a migration script a couple months ago. I don't know whether he packaged the code he ended up with for reuse. Here's a record of the IRC chat in which details got worked out:

RE: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Tim Peters
[Tim Peters] Stephan Richter was wrestling with a migration script a couple months ago. I don't know whether he packaged the code he ended up with for reuse. Here's a record of the IRC chat in which details got worked out: http://zope3.pov.lt/irclogs/%23zope3-dev.2005-08-25.log.html

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Jeremy Hylton
On 11/9/05, David Binger [EMAIL PROTECTED] wrote: On Nov 9, 2005, at 9:21 AM, Syver Enstad wrote: What I want to do is just update the persistent instance so that it will load from the new module/ new class after I have done a one time update of the database. I fear this will

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-10 Thread Jeremy Hylton
On 11/9/05, David Binger [EMAIL PROTECTED] wrote: On Nov 9, 2005, at 10:37 AM, Jeremy Hylton wrote: How do you find all the references? It seems like you would need to execute a transaction that iterated over every object in the storage and searched the pickle for references to the

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-09 Thread Syver Enstad
Dieter Maurer wrote: Syver Enstad wrote at 2005-11-7 11:51 +0100: In ZODB 3.2 I can replace the _classFactory method on DB and locate the renamed/moved class by other means (a lookup table that maps old module classname pairs to another class in another module). If I change attributes of

RE: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-09 Thread Tim Peters
[David Binger] Is there something to prevent your update script from setting _p_changed = 1 on every persistent object that contains a reference to an instance of the moved class? I think that if you do that and commit and pack the database, the old module/class references will be purged. If

Re: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-09 Thread David Binger
On Nov 9, 2005, at 10:37 AM, Jeremy Hylton wrote: How do you find all the references? It seems like you would need to execute a transaction that iterated over every object in the storage and searched the pickle for references to the class. You do need to do this to find the references

RE: [ZODB-Dev] Migrating classes in ZODB 3.5.1

2005-11-08 Thread Tim Peters
[Syver Enstad] In ZODB 3.2 I can replace the _classFactory method on DB and locate the renamed/moved class by other means (a lookup table that maps old module classname pairs to another class in another module). If I change attributes of the persistent instance it will be saved with the new