← Back to team overview

openupgrade-drivers team mailing list archive

[Question #232370]: module : mail. Problem in the structure database (mail.mail, mail.message)

 

New question #232370 on OpenUpgrade Addons:
https://answers.launchpad.net/openupgrade-addons/+question/232370

Hi everybody, 

working on 'mail' module migration, I have some problem. (again...)
It seem like the class in 6.1 "mail.message" is not the same class that 7.0 "mail.message".

*** In 6.1, there is only
- mail.message.common (abstract)
- mail.message (inherit 'mail.message.common'). The doc says :  "Model holding RFC2822 email messages".

*** In 7.0 there is : 
- mail.message (inherits 'ir.needaction_mixin'). The doc says : "system notification (replacing res.log notifications), comments (OpenChatter discussion) and incoming emails."
- mail.mail (inherit 'mail.message'). The doc says : "Model holding RFC2822 email".

*** the migration should be :
- res.log, comment & other ----> mail.message
- mail.message ----> mail.mail

*** Propose :
- in mail / pre-migration.py, renaming the table mail_message in "openupgrade_old_mail_message" (and the 4 indexes of the table) ; 
- the system recreate the table "mail_message" because it doesn't exist ;  
- in mail / post-migration.py : 
--> using "openupgrade_old_mail_message" to write in "mail_mail" ; 
--> using "res_log" & other to write into the new "mail_message" ;  

What do you think ?

-- 
You received this question notification because you are a member of
OpenUpgrade Drivers, which is an answer contact for OpenUpgrade Addons.