From 846d2f631b21dec404c55e628512ae607d86a86b Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Mon, 30 Sep 2024 17:05:56 +0200 Subject: [PATCH] [IMP] postgtresql-version option --- newsfragments/postgresql-version-prompt.feature | 2 ++ odoo_openupgrade_wizard/cli/cli_init.py | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 newsfragments/postgresql-version-prompt.feature diff --git a/newsfragments/postgresql-version-prompt.feature b/newsfragments/postgresql-version-prompt.feature new file mode 100644 index 0000000..379b515 --- /dev/null +++ b/newsfragments/postgresql-version-prompt.feature @@ -0,0 +1,2 @@ +* Avoid to crash if postgresql-version is not set, adding prompt option. +* add extra text to mention postgresql version constraints. diff --git a/odoo_openupgrade_wizard/cli/cli_init.py b/odoo_openupgrade_wizard/cli/cli_init.py index 79ef49e..c3bfc44 100644 --- a/odoo_openupgrade_wizard/cli/cli_init.py +++ b/odoo_openupgrade_wizard/cli/cli_init.py @@ -39,11 +39,15 @@ from odoo_openupgrade_wizard.tools.tools_system import ( @click.option( "--postgresql-version", required=True, + prompt=True, help="The version of postgresql that will be used" " to create the postgresql container.Ex : '9.1', '16', ..." " The version should be available in docker hub." " (https://hub.docker.com/_/postgres)" - " avoid the 'latest' version if you want a deterministic installation.", + " avoid the 'latest' version if you want a deterministic installation." + " Key Point: If your current production server uses Postgresql version A" + " and if your future production server usees Postgresql version B," + " you should select here a version X, with A <= X <= B.", ) @click.option( "--extra-repository",