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