about summary refs log tree commit diff
path: root/app/lib/admin/system_check/database_schema_check.rb
blob: c2f01fd55b528c991c798c23325edc641b14a85f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

class Admin::SystemCheck::DatabaseSchemaCheck < Admin::SystemCheck::BaseCheck
  def skip?
    !current_user.can?(:view_devops)
  end

  def pass?
    !ActiveRecord::Base.connection.migration_context.needs_migration?
  end

  def message
    Admin::SystemCheck::Message.new(:database_schema_check)
  end
end