Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/azure-cli/azure/cli/command_modules/rdbms/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def _flexible_server_params(command_group):
)

pg_version_upgrade_arg_type = CLIArgumentType(
arg_type=get_enum_type(['12', '13', '14', '15', '16', '17']),
arg_type=get_enum_type(['13', '14', '15', '16', '17']),
options_list=['--version', '-v'],
help='Server major version.'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,6 @@ def flexible_server_version_upgrade(cmd, client, resource_group_name, server_nam
current_version = int(instance.version.split('.')[0])
if current_version >= int(version):
raise CLIError("The version to upgrade to must be greater than the current version.")
if version == '12':
logger.warning("Support for PostgreSQL 12 has officially ended. As a result, "
"the option to select version 12 will be removed in the near future. "
"We recommend selecting PostgreSQL 13 or a later version for "
"all future operations.")

list_server_capability_info = get_postgres_server_capability_info(cmd, resource_group_name, server_name)
eligible_versions = list_server_capability_info['supported_server_versions'][str(current_version)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ def _pg_version_validator(version, versions, is_create):
if version not in versions:
raise CLIError('Incorrect value for --version. Allowed values : {}'.format(sorted(versions)))
if version == '12':
logger.warning("Support for PostgreSQL 12 has officially ended. As a result, "
"the option to select version 12 will be removed in the near future. "
raise CLIError("Support for PostgreSQL 12 has officially ended. "
"We recommend selecting PostgreSQL 13 or a later version for "
"all future operations.")

Expand Down
Loading