odoo / docker

Other
960 stars 1.55k forks source link

upgrade process #174

Open slasse opened 6 years ago

slasse commented 6 years ago

Hi guys,

i am looking for some info regarding the upgrade process for dockerised odoo sites, in the info on the main page it sais the following:

**"""" How to upgrade this image Odoo images are updated on a regular basis to make them use recent releases (a new release of each version of Odoo is built every night). Please be aware that what follows is about upgrading from an old release to the latest one provided of the same major version, as upgrading from a major version to another is a much more complex process requiring elaborated migration scripts (see Odoo Enterprise Upgrade page or this community project which aims to write those scripts).

Suppose you created a database from an Odoo instance named old-odoo, and you want to access this database from a new Odoo instance named new-odoo, e.g. because you've just downloaded a newer Odoo image.

By default, Odoo 8.0 uses a filestore (located at /var/lib/odoo/filestore/) for attachments. You should restore this filestore in your new Odoo instance by running

$ docker run --volumes-from old-odoo -p 8070:8069 --name new-odoo --link db:db -t odoo

""""**

now if i am not mistaking updating the source files is just 1 part of the process, the database should also be upgraded or am i wrong?

i have found references online to add -u -d to the startup command for the container but i wonder why this is not mentioned here on the official repo?

is the update of the database somehow managed in the startup of the container or something?

any insight would be appreciated

lathama commented 6 months ago

From https://www.odoo.com/documentation/17.0/developer/reference/cli.html#running-the-server

-u<modules>,--update<modules>
comma-separated list of modules to update before running the server. Use all for all modules. (requires [-d](https://www.odoo.com/documentation/17.0/developer/reference/cli.html#cmdoption-odoo-bin-d)).

I would read the changelog between old-odoo to new-odoo as there should be no change that causes database issues.

To update/upgrade all the modules/addons (good idea)

docker run -p 8069:8069 -it <volumes and stuffs> odoo -- --update all

Obviously you are testing this on backups and such. Addon update would look for the addons/dir and apply updates/upgrades as you would via the apps menu. The addons would populate the database with any view/model or other change.

@slasse So to answer your question simply: Updating modules/addons does update the database.

I hope this helps. I see this is an old ticket. I am cleaning up old stuffs. If you do not need this issue please close.