- Mailing Lists
- Contributors
- Re: Migration Folders during migration in OCA Modules
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Re: Migration Folders during migration in OCA Modules
Op 7/15/21 om 1:21 AM schreef Graeme Gellatly: > Client is on version 8.0.1 of mis_builder. They migrate using > OpenUpgrade and it skips the very important 8.0.2 migration. I don't fully grasp your other issue, but here I always just install all the newest modules first (easy to do if you use gitaggregator) and run 'odoo -u base', before starting OpenUpgrade.
by Tom Blauwendraat - 10:05 - 15 Jul 2021
Reference
-
Migration Folders during migration in OCA Modules
Hi all,Increasingly I am facing an issue with both OpenUpgrade and Enterprise migrations in relation to migrations folders. We have a practice of deleting them whenever a module is migrated.So my question is why?Let me outline a few issues on one side and hope I can be enlightened of the other side.Client is on version 8.0.1 of mis_builder. They migrate using OpenUpgrade and it skips the very important 8.0.2 migration.Another client chose to use Openupgrade only for core modules for intervening versions. This is essentially the same issue as an enterprise migration of 2 versions. You get the database back without 3rd party modules migrated.The latest module version only contains scripts for 1 version. So you spend hours hunting through finding the scripts, forking repos etc to get the scripts you need.But also I ask myself if we couldn't reduce multiversion migration time if a current version ran multiple folders. But then again, Odoo enterprise migration does all modules for a version, then moves to the next version so perhaps not feasible.
by Graeme Gellatly - 01:20 - 15 Jul 2021-
Re: Migration Folders during migration in OCA Modules
Yes, a pre-requisite is to have the previous version up to date before starting the migration, and if you run a migration across several versions in between, you have to manually launch the intermediate version scripts. It's what you have if you go through the enterprise path. I doubt Odoo performs all the migrations in one step, but it would be a version per version migration, but you only see the final result of the black box.It's not possible to keep all the migration scripts across versions due to several reasons:- "Logistic" one: keeping in sync such migration scripts across versions is a pain. If you perform a fix on v12 migration scripts, would you sincerely do the same patch on v13 and v14?- And the main one: there are data transformations that aren't idempotent (for example, the renaming of a column), which means that running them several times will lead to errors. This combined with the pre/post/end mechanism, makes a non deterministic scenario where you will need to add a lot of control logic - or it will be directly impossible- to be handled across several versions. Example:- On v12, you have 12.0.1.0.0 and 12.0.2.0.0 with scripts.- On v13, you have 13.0.1.0.0 with scripts.Migrating from v11 to v13, if all the scripts are in v13 (12.0.1.0.0, 12.0.2.0.0, 13.0.1.0.0 and 13.0.2.0.0), and you are not accessing v12 migration cycle, you will get this execution pipeline:- Run 12.0.1.0.0 pre-migration- Run 12.0.2.0.0 pre-migration- Run 13.0.1.0.0 pre-migration- Run 12.0.1.0.0 post-migration- Run 12.0.2.0.0 post-migration- Run 13.0.1.0.0 post-migrationRunning with OpenUpgrade on each version, the execution pipeline is:- Run 12.0.1.0.0 pre-migration- Run 12.0.2.0.0 pre-migration- Run 12.0.1.0.0 post-migration- Run 12.0.2.0.0 post-migration<new migration cycle>- Run 13.0.1.0.0 pre-migration- Run 13.0.1.0.0 post-migrationThe only way is to manually re-create the same sequence. And this, expecting that there's no other dependent modules that perform operations on the expected pipeline.More things to take into account: OCA module migration scripts are settled on expected renamed columns by OpenUpgrade, so we don't know how enterprise migration scripts are letting data, and thus, you will probably need to adapt existing migration scripts. Example: on the migration from 12 to 13, account.invoice model is merged with account.move. On OpenUpgrade, we created the columns `old_invoice_id` and `old_invoice_line_id` to link the previous record, and a lot of migration scripts rely on these columns for transferring information from old invoices to new moves.Conclusion: I have resigned to use enterprise migration services, even on enterprise instances, and always do it through OpenUpgrade.Regards.
by Pedro M. Baeza - 02:30 - 15 Jul 2021 -
Re: Migration Folders during migration in OCA Modules
Op 7/15/21 om 1:21 AM schreef Graeme Gellatly: > Client is on version 8.0.1 of mis_builder. They migrate using > OpenUpgrade and it skips the very important 8.0.2 migration. I don't fully grasp your other issue, but here I always just install all the newest modules first (easy to do if you use gitaggregator) and run 'odoo -u base', before starting OpenUpgrade.
by Tom Blauwendraat - 10:05 - 15 Jul 2021
-