[Zope3-dev] Re: CVS: Zope3/src/zope/app/services/tests - test_connectionservice.py:1.13 test_connectionregistration.py:NONE

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Aug 19 11:26:25 EDT 2003


On Tuesday 19 August 2003 09:52, Jim Fulton wrote:
> You need to provide a conversion script.

Okay, I guess I will bite the bullet and be the first one doing such a script 
(since everyone up to now was very careful avoiding this issue). So what are 
the requirements for such a conversion script?

I think the only major incompatibility is the registration code, since 
Database Adapters are now just named utilities. In this particular case this 
means:

1. We have to provide a switch from ConnectionConfiguration to 
ConnectionRegistration, since the previous developer chickened out on writing 
a script.

2. Then we also need to handle ConnectionRegistrations, which became utility 
registrations.

3. The script must look through the entire tree trying to find Service 
Managers that have "SQL Connection" services and DA objects in it. 

I think the actual conversion should be straightforward. The question is: 
Should the script run from the command line? How do I provide stub 
implementations for the broken components that cannot be imported anymore?

> You need to stop and work with folks on this list to find out if
> it'a acceptable to toss the database. If it's not, you need to back the
> change out until you can provide a conversion script.

Ok. BTW, this all does not affect you at all, if you do not have a RDB 
Connection declared (for now; I plan to convert more code though).

Mmmh, here is a very manual, but affective conversion script:

1. Before updating, write down the location (in the object tree) and DSN of 
each Database Adapter instance. Also make a note of the registration state.

2. Unregister and delete the Database Adapters.

3. Update your Zope.

4. Start up Zope and re-add all you Database Adapter Instances. 

Now that I think about it, this is probably the best solution for now, since 
noone will have hundreds or even 10 different database connections setup, or 
am I wrong? Anyone?

A third solution would be to make use of fssync. Fred, do you have any 
comments to make here? ;-)
 
Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training




More information about the Zope3-dev mailing list