Migrating from odpm 3.0 to 4.x¶
AI-translated from Russian.
There is no automatic migration. Compatibility with version 3.0 is broken.
A 3.0 environment must not be “upgraded in place”. You need a new project directory for 4.x and migration of database data, not configuration files in the old format.
Recommended order¶
- Back up the database from the 3.0 environment:
- with
odpm --db-backup(if the old odpm is still available), or - with PostgreSQL tools (
pg_dump). - Create a new odpm environment directory (e.g.
project-17-v4/). - Install odpm 4.x — installation.
- Run
odpm --initwith the current repository and 4.x-formatodpm.json. - Bring up the environment and restore the database:
odpm -d database_name --db-restore archive_name - Update modules for the new Odoo version:
odpm -d database_name -u
Keep the old 3.0 directory for reference until the team fully switches.
If you repeat odpm --init in the same environment directory (not recommended for production), the old Docker volume *_postgres-data may point at an outdated data/postgres/... path. Remove the volume before starting: docker volume rm <project>_postgres-data — see non-interactive runs.
What changed fundamentally¶
- Scenarios
developer,server,ciinstead of a single behavior. - Lock file
.odpm/deps.lock.json, commandodpm plan. - Service configuration
.odpm/runtime/config.jsoninstead of scattered parameter passing.
For developers of odpm itself — Python module rename table: imports 4.0→4.1 (in the odpm repository).