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",