From 2957061ade1682461dfb5546dfb096e2e306ef6a Mon Sep 17 00:00:00 2001 From: Alexander Meindl Date: Wed, 13 Mar 2019 08:56:31 +0100 Subject: [PATCH] try to fix migration problem for rails 5 #40 --- init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.rb b/init.rb index fc78d549..c004f109 100644 --- a/init.rb +++ b/init.rb @@ -38,7 +38,7 @@ Redmine::Plugin.register :additionals do RedCloth3::ALLOWED_TAGS << 'div' end -if ActiveRecord::Base.connection.active? && ActiveRecord::Base.connection.table_exists?(:settings) +unless ActiveRecord::Base.connection.migration_context.needs_migration? Rails.configuration.to_prepare do Additionals.setup end