← Back to team overview

openupgrade-drivers team mailing list archive

Re: openupgrade70 and non openobjects addons

 

Hi Sandy,

> What I don't understand is the situation of the rest of the modules
> (mgmtsystem[1] is the one I'm currently working on).
> Since I doubt openupgrade will maintain a branch for each modules
> containing migration scripts, what is the problem with adding migration
> files to the modules themselves. Correct me if I'm wrong, but I thought
> only openupgrade looks into migration files.

the migration mechanism exists also in standard openerp server, banking-addons 
for example make use of that: http://bazaar.launchpad.net/~banking-addons-team/banking-addons/6.1/view/head:/account_banking/migrations/0.1.81/post-set-statement-line-state.py

> What I'm getting at is that I'm stuck trying to push my migration
> scripts to mgmtsystem and I don't understand what steps are needed to
> fix them[1].

The thing is, if someone tries to run those migration scripts not via 
openupgrade-server, but via the standard openerp-server (which happens if you 
let OpenERP SA migrate your database), they will break if you rely on 
openupgrade functionality.
The short term solution is as Stefan pointed out to make a copy of the helper 
functions you need. The better one would be to encapsulate them in a module 
that other projects can use independently of openupgrade.
A third option would be to check if you can import from openupgrade and do 
nothing if that's not possible. But this would be a shame somehow, because 
someone would have to rewrite the migration for standard openerp.

Regards,
Holger

-- 
Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie

mail: holger@xxxxxxxx
web: http://therp.nl

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow ups

References