Skip to content

Commit

Permalink
ensure external DB is PostgreSQL 13
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni authored and ehelms committed Jun 13, 2024
1 parent 1c9e873 commit c586f23
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions definitions/checks/foreman/validate_external_db_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ class ValidateExternalDbVersion < ForemanMaintain::Check

def run
current_db_version = feature(:foreman_database).db_version
fail!(db_upgrade_message(current_db_version)) if current_db_version.major < 12
fail!(db_upgrade_message(current_db_version)) if current_db_version.major < 13
end

def db_upgrade_message(db_version)
product_name = feature(:instance).product_name

"\n\n*** ERROR: Server is running on PostgreSQL #{db_version} database.\n"\
"*** Newer version of #{product_name} supports only PostgreSQL version 12.\n"\
"*** Before proceeding further, you must upgrade database to PostgreSQL 12.\n"
"*** Newer version of #{product_name} supports only PostgreSQL version 13.\n"\
"*** Before proceeding further, you must upgrade database to PostgreSQL 13.\n"
end
end
end
Expand Down

0 comments on commit c586f23

Please sign in to comment.