[doc] when to use pre- and when to use post- migration?

Asked by Dimitri John Ledkov (ex-credativ)

In terms of fields/models/xmldata changes?

When shall i do it in pre- and when should I do it in post-?

What is actually happening *during*, ie. between pre- and post-?

Question information

Language:
English Edit question
Status:
Answered
For:
OpenUpgrade Server Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#2

Hi Dmitrijs,

again, apologies for the delayed reply.

In between running the pre- and post-migration scripts, OpenERP reads the new model definitions from the module code. It updates the database layout and loads the module's data files. It also instanciates the ORM objects for the models. That means that you can use the ORM in the post stage, but not in the pre stage.

The pre stage is used almost exclusively for preserving data that would otherwise be overwritten or duplicated because it is obsolete or renamed or moved between modules in the new OpenERP server version.

For everything else use the post stage, to take advantage of the availability of the ORM.

Cheers,
Stefan.

Can you help with this problem?

Provide an answer of your own, or ask Dimitri John Ledkov (ex-credativ) for more information if necessary.

To post a message you must log in.