From acf1524e580a8725d21a271eee1df7ff1faf0a96 Mon Sep 17 00:00:00 2001 From: Denis Vermylen Date: Tue, 3 Jul 2018 11:24:36 +0200 Subject: [PATCH] [ADD] odoo_sh: upgrade odoo version --- odoo_sh/advanced.rst | 1 + odoo_sh/advanced/upgrade_your_database.rst | 43 ++++++++++++++++++++++ odoo_sh/getting_started/branches.rst | 3 +- odoo_sh/getting_started/builds.rst | 2 + 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 odoo_sh/advanced/upgrade_your_database.rst diff --git a/odoo_sh/advanced.rst b/odoo_sh/advanced.rst index fd2b1a0fe..abbf66ea9 100644 --- a/odoo_sh/advanced.rst +++ b/odoo_sh/advanced.rst @@ -9,3 +9,4 @@ Advanced advanced/containers advanced/submodules + advanced/upgrade_your_database diff --git a/odoo_sh/advanced/upgrade_your_database.rst b/odoo_sh/advanced/upgrade_your_database.rst new file mode 100644 index 000000000..4dca29fb6 --- /dev/null +++ b/odoo_sh/advanced/upgrade_your_database.rst @@ -0,0 +1,43 @@ +:banner: banners/odoo-sh.jpg + +===================== +Upgrade your database +===================== + +.. _odoosh-advanced-upgrade_your_database: + +1. Download and Upload your database +----------------------- + +Download a dump of your database (from the :ref:`Builds view `), choose the +exact copy and without filestore options. Upload the .sql.gz dump on https://upgrade.odoo.com/database/upload and +select the Testing Purpose. If you have custom code, you can choose to have it upgraded by us, or do it yourself. Once +it's processed, you'll get a dump of the database in return. + +2. Test your upgraded database +------------------------------ + +Create a staging branch that will run the upgraded database. Either make sure your production branch's code is +compatible between the two Odoo versions and fork your production branch, or make a new staging branch containing +the upgraded code. + +Once the staging build is done (it doesn't matter if it failed due to the version incompatibility), import your +upgraded dump in the backups tab of the branch. The platform will automatically detect the version of the dump and +change the version of Odoo's source code to the corresponding version for the build. + +Test the upgraded database and make sure everything runs as it's supposed to. + +3. Replace your existing production database +-------------------------------------------- + +Once you've tested everything and you're satisfied, start the process over to get an up-to-date upgraded dump: + +* Make a new dump of your production database (as described in step 1) +* Upload it on upgrade.odoo.com and select the Production purpose +* Receive the newly upgraded dump and import it in your production branch. The build might get marked as failed because + the platform will run it with the upgraded databases' Odoo version together with the old custom code. +* Merge or commit the upgraded custom code in the production branch + +If anything goes wrong, remember you can restore a backup. The platform will always make one before you make any +Odoo.sh operation on the production database. If the restored backup comes from a previous version, the platform will +detect it and change the project's Odoo version back if it needs to. diff --git a/odoo_sh/getting_started/branches.rst b/odoo_sh/getting_started/branches.rst index 691a4ce82..b72f22099 100644 --- a/odoo_sh/getting_started/branches.rst +++ b/odoo_sh/getting_started/branches.rst @@ -261,7 +261,8 @@ For development branches only, you can change the version of Odoo, should you wa features while your production database is in the process of being upgraded to a newer version. The production branch has no settings. It can't be muted, will always update the existing production database and will -run on the project's version of Odoo. +run on the project's version of Odoo. If you want to upgrade your production to a newer version please refer to the +:ref:`Upgrade section `. Git commands ============ diff --git a/odoo_sh/getting_started/builds.rst b/odoo_sh/getting_started/builds.rst index 35138954d..ec858c91f 100644 --- a/odoo_sh/getting_started/builds.rst +++ b/odoo_sh/getting_started/builds.rst @@ -112,6 +112,8 @@ You can access the build's database as the administrator using the *Connect* but Also, you can access the database with another user using the *Connect as* button, in the dropdown menu of the *Connect* button. +.. _odoosh-gettingstarted-builds-download-dump: + .. image:: ./media/interface-builds-build-dropdown.png :align: center