From afd70ffa1a0ea716b18261bef0d7b84646e9e43d Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Wed, 13 Mar 2019 11:01:24 -0400 Subject: [PATCH] Loosen the Postgres version initializer check We want to give developers some more time to upgrade, but also want production to be able to use 10 now. --- config/initializers/postgres_required_versions.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/initializers/postgres_required_versions.rb b/config/initializers/postgres_required_versions.rb index a9035745c65..df147471e23 100644 --- a/config/initializers/postgres_required_versions.rb +++ b/config/initializers/postgres_required_versions.rb @@ -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