summaryrefslogtreecommitdiff
path: root/app/helpers/admin/components_helper.rb
blob: 577c12a0184a4b76d25a9c9cb112031be4c40f76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Admin
  module ComponentsHelper
    def database_versions
      Gitlab::Database.database_base_models.transform_values do |base_model|
        reflection = ::Gitlab::Database::Reflection.new(base_model)
        {
          adapter_name: reflection.human_adapter_name,
          version: reflection.version
        }
      end.symbolize_keys
    end
  end
end