Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure external DB is PostgreSQL 13 #884

Merged
merged 1 commit into from
Jun 13, 2024
Merged
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
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
Loading