Merge lp:~therp-nl/openupgrade-server/7.0-deferred_steps into lp:openupgrade-server
Status: | Merged |
---|---|
Merged at revision: | 4629 |
Proposed branch: | lp:~therp-nl/openupgrade-server/7.0-deferred_steps |
Merge into: | lp:openupgrade-server |
Diff against target: |
181 lines (+74/-30) 4 files modified
openerp/addons/base/ir/ir_model.py (+13/-1) openerp/modules/loading.py (+5/-5) openerp/openupgrade/deferred_70.py (+55/-0) openerp/openupgrade/openupgrade_loading.py (+1/-24) |
To merge this branch: | bzr merge lp:~therp-nl/openupgrade-server/7.0-deferred_steps |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sylvain LE GAL (GRAP) | Needs Information | ||
Holger Brunn (Therp) | code review | Approve | |
Review via email:
|
Description of the change
Apparently, OpenERP 7.0 attempts to remove dropped columns and obsolete model's tables, triggered when an existing ir_model_data entry of the models 'ir.model' and 'ir.model.field' is not instanciated after a succesful module upgrade. That could be undesirable under certain circumstances, leading to data loss. Also, when whole models are missing there is the problem that the table cannot be retrieved anymore because this data is not in the database but only available from the instanciated model itself. This causes a lot of ugly errors in the log file. This branch logs the attempts to drop columns or tables but does not perform them.
Additionally, the deferred migration step is moved to a separate file and its call is optimized not to run at every pool initialization but only when at least some modules are being upgraded.
Hi.
1/ About the _drop_column & _drop_table calls. I agree with the concept but I will not be able to reproduce the call to these functions after a migration. Can you detail me when the problems occurs ? (an example of table or field that OpenERP try to delete).
2/ deferred migration move & conditional call : agreed.
Remark :
diff, line 20. "Not dropping the table of model ..." --> "Not dropping the table or view of model ..."