Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions odoo_tools/cli/migrate_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ def _prepare_parameters(ctx):
"odoo/songs/migration_db/odoo_upgrade_env_file"
)
ctx.obj["db_name"] = prod_dump_path.stem
ctx.obj["db_prod"] = ctx.obj["db_name"] + "_prod"
ctx.obj["db_prod_fixed"] = ctx.obj["db_name"] + "_prod_fixed"
ctx.obj["db_odoo_migrated"] = ctx.obj["db_name"] + "_odoo_migrated"
ctx.obj["db_c2c_core"] = ctx.obj["db_name"] + "_core"
ctx.obj["db_c2c_external"] = ctx.obj["db_name"] + "_external"
ctx.obj["db_c2c_local"] = ctx.obj["db_name"] + "_local"
ctx.obj["db_c2c_cleanup"] = ctx.obj["db_name"] + "_cleanup"
ctx.obj["db_c2c_migrated"] = ctx.obj["db_name"] + "_c2c_migrated"
ctx.obj["db_prod"] = ctx.obj["db_name"] + "_1_prod"
ctx.obj["db_prod_fixed"] = ctx.obj["db_name"] + "_2_prod_fixed"
ctx.obj["db_odoo_migrated"] = ctx.obj["db_name"] + "_3_odoo_migrated"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this parameter is also used to generate the _odoo_migrated.pg dump file, we'll get a _3_odoo_migrated.pg instead here. Not really an issue that said.

ctx.obj["db_c2c_core"] = ctx.obj["db_name"] + "_4_core"
ctx.obj["db_c2c_external"] = ctx.obj["db_name"] + "_5_external"
ctx.obj["db_c2c_local"] = ctx.obj["db_name"] + "_6_local"
ctx.obj["db_c2c_cleanup"] = ctx.obj["db_name"] + "_7_cleanup"
ctx.obj["db_c2c_migrated"] = ctx.obj["db_name"] + "_8_c2c_migrated"
Comment on lines +183 to +184
Copy link
Contributor

@sebalix sebalix Aug 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, cleanup and c2c_migrated are the same thing, the first is the name of the step (and DB snapshot by extension), and the last one is used to generate the .pg file (from cleanup snapshot) on disk to be self-explanatory (odoo_migrated.pg / c2c_migrated.pg).

We could rework that for sure, but here better to remove the _8 prefix in db_c2c_migrated as it's not used to generate DB snapshots.

ctx.obj["contract_number"] = ctx.params["contract_number"]


Expand Down