try to fix migration problem for rails 5 #40

This commit is contained in:
Alexander Meindl 2019-03-13 08:56:31 +01:00
parent 495024021e
commit 2957061ade

View File

@ -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