Skip to Content

Contributors

Re: Removal of migration scripts on each new version

+1 pedro y stefan.
I believe this topic has been discussed more than once. It would be interesting to indicate the decision made and the reasoning behind it, to avoid having to deal with it every year.

El mié, 7 may 2025 a las 11:42, Raphaël Reverdy (<notifications@odoo-community.org>) escribió:
Hello,

With our existing OCA tools and processes, I think it's better to remove migrations scripts from previous versions.

back/forwarding changes across different versions is already a boring and time consuming task. 
Doing the same for not testable-on-CI and hard-to-review migrations scripts ? I doubt it will be consistently done.

Running migration with openupgrade alone or Odoo EE + openupgrade for each version looks to be the safest way.

Raph

Le mer. 7 mai 2025 à 08:56, Tom Blauwendraat <notifications@odoo-community.org> a écrit :
On 5/6/25 23:27, Tom Blauwendraat wrote:



> (...) while we think we may be helping them, to me it's just an 



> assumption, which is a pretty thin argument to make a change. If it 



> does make things messier for tech-savvy people, then not doing it may 



> be the best option.

I wanted to add to this that -if- some of the Enterprise-heavy OCA 
member companies (Ad-Hoc, Camptocamp, Acsone etc) have a convincing 
argument why this is really helpful to them, I would weigh that argument 
heavier than what Openupgrade-heavy companies would say about it. After 
all, it does not break Openupgrade.


_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--
Raphaël Reverdy
Mobile +33 6 38 02 03 93
Fixe +33 4 82 53 84 60

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe



--
Recuerda visitar nuestro blog para ver contenido gratuito de calidad.

 

Valentín Vinagre Urteaga

CTO

Sygel Technology S.L

 
+34 613 04 66 67
valentin.vinagre@sygel.es
https://www.sygel.es
C/ Àlaba 61, 5ª planta, 08005, Barcelona
 
 
 

by Valentín Vinagre - 12:01 - 7 May 2025

Reference

  • Removal of migration scripts on each new version
    Hi,

    the migration guide mandates the following

    > Remove any possible migration script from previous version (in a nutshell, remove migrations folder inside the module if exists).

    (https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-18.0#tasks-to-do-in-the-migration)

    However, it is not uncommon to skip versions when migrating an Odoo instance. You would go from 15.0 or 16.0 to 18.0 rather than migrating every year. When using the Odoo enterprise migration, the migration scripts between the source and the target version are supposed to be present in the target version. So the migration guideline breaks this type of migration.

    I had a disagreement with Pedro Baeza about this on one PR, but I keep coming across instances of this such as https://github.com/OCA/account-invoicing/pull/1874 today so I would like to discuss this in a wider audience.

    My preference would be for the guideline to change to say that it is allowed to keep some of the scripts if they are safe for inclusion in the later version (such as the script from https://github.com/OCA/account-invoicing/pull/1874, which checks if a field already exists before trying to add it).

    Can I have a temperature check from the community to see how you all feel about this?

    Best regards,
    Stefan

    -- 
    Opener B.V. - Business solutions driven by open source collaboration
    
    Stefan Rijnhart - Consultant/developer
    
    mail: stefan@opener.amsterdam
    tel: +31 (0) 6 1447 8606
    web: https://opener.amsterdam

    by Stefan Rijnhart - 01:00 - 6 May 2025