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