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