database_schema_check.rb 338 B

123456789101112131415
  1. # frozen_string_literal: true
  2. class Admin::SystemCheck::DatabaseSchemaCheck < Admin::SystemCheck::BaseCheck
  3. def skip?
  4. !current_user.can?(:view_devops)
  5. end
  6. def pass?
  7. !ActiveRecord::Base.connection.migration_context.needs_migration?
  8. end
  9. def message
  10. Admin::SystemCheck::Message.new(:database_schema_check)
  11. end
  12. end