Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Removal of migration scripts on each new version

by
Opener B.V., Stefan Rijnhart
- 06/05/2025 15:36:18
On 06-05-2025 15:22, Sergio Corato wrote:

Il giorno mar 6 mag 2025 alle ore 14:27 Stefan Rijnhart <notifications@odoo-community.org> ha scritto:
On 06-05-2025 14:17, Juan José Scarafía wrote:

> there. If you *are* updating version by version, those older scripts 
> just won't run anyway, right?

That is correct, if you migrate from 17 to 18, any 16.0.x.x.x migration 
script will not be triggered.
This will happen only if the "version" variable in the script is checked?

No, the version variable passed to each script does not need to be checked. It is the Odoo migration manager that filters out the scripts by the versions indicated in the directory names: https://github.com/odoo/odoo/blob/18.0/odoo/modules/migration.py#L203-L216

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

Reference