Skip to content

Commit

Permalink
Merge pull request #18547 from carbonin/loosen_postgres_version_check
Browse files Browse the repository at this point in the history
Loosen the Postgres version initializer check
  • Loading branch information
jrafanie authored Mar 14, 2019
2 parents 92177e5 + afd70ff commit d6a7558
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions config/initializers/postgres_required_versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
def initialize(*args)
super

msg = "The version of PostgreSQL being connected to is incompatible with #{Vmdb::Appliance.PRODUCT_NAME} (10 required)"

if postgresql_version < 90500
raise "The version of PostgreSQL being connected to is incompatible with #{Vmdb::Appliance.PRODUCT_NAME} (9.5 required)"
raise msg
end

if postgresql_version >= 90600
msg = "The version of PostgreSQL being connected to is incompatible with #{Vmdb::Appliance.PRODUCT_NAME} (9.6+ is not supported yet)"

if postgresql_version < 100000 || postgresql_version >= 110000
raise msg if Rails.env.production? && !ENV["UNSAFE_PG_VERSION"]
$stderr.puts msg
end
Expand Down

0 comments on commit d6a7558

Please sign in to comment.