2021-04-03 23:12:30 +11:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Admin::SystemCheck::DatabaseSchemaCheck < Admin::SystemCheck::BaseCheck
|
2022-07-05 10:41:40 +10:00
|
|
|
def skip?
|
|
|
|
!current_user.can?(:view_devops)
|
|
|
|
end
|
|
|
|
|
2021-04-03 23:12:30 +11:00
|
|
|
def pass?
|
|
|
|
!ActiveRecord::Base.connection.migration_context.needs_migration?
|
|
|
|
end
|
|
|
|
|
|
|
|
def message
|
|
|
|
Admin::SystemCheck::Message.new(:database_schema_check)
|
|
|
|
end
|
|
|
|
end
|