From 58282e355a9047462cc102054657ee49c6fb0af7 Mon Sep 17 00:00:00 2001 From: Nick Thomas Date: Tue, 16 Jan 2018 12:27:04 +0000 Subject: Update seed-fu to a version compatible with postgresql 10 --- config/initializers/ar5_pg_10_support.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'config/initializers') diff --git a/config/initializers/ar5_pg_10_support.rb b/config/initializers/ar5_pg_10_support.rb index 3d8ccd814a8..6fae770015c 100644 --- a/config/initializers/ar5_pg_10_support.rb +++ b/config/initializers/ar5_pg_10_support.rb @@ -1,5 +1,6 @@ raise "Vendored ActiveRecord 5 code! Delete #{__FILE__}!" if ActiveRecord::VERSION::MAJOR >= 5 +require 'active_record/connection_adapters/postgresql_adapter' require 'active_record/connection_adapters/postgresql/schema_statements' # @@ -10,6 +11,14 @@ require 'active_record/connection_adapters/postgresql/schema_statements' # rubocop:disable all module ActiveRecord module ConnectionAdapters + + # We need #postgresql_version to be public as in ActiveRecord 5 for seed_fu + # to work. In ActiveRecord 4, it is protected. + # https://github.com/mbleigh/seed-fu/issues/123 + class PostgreSQLAdapter + public :postgresql_version + end + module PostgreSQL module SchemaStatements # Resets the sequence of a table's primary key to the maximum value. -- cgit v1.2.1