Skip to content

Commit

Permalink
Merge pull request #16171 from chrisarcand/fail-unless-pg-95
Browse files Browse the repository at this point in the history
Add PostgreSQL version restriction
  • Loading branch information
bdunne authored Oct 12, 2017
2 parents b525389 + 8f5cf8c commit 47d468c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/initializers/postgres_required_versions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.prepend Module.new {
def initialize(*args)
super
if postgresql_version < 90400 || postgresql_version >= 90600
raise "The version of PostgreSQL being connected to is incompatible with #{I18n.t("product.name")}"
end
end
}

0 comments on commit 47d468c

Please sign in to comment.