illuma-law/healthcheck-migration

Focused migration backlog health check for Spatie's Laravel Health package.

Maintainers

Package info

github.com/illuma-law/healthcheck-migration

pkg:composer/illuma-law/healthcheck-migration

Fund package maintenance!

illuma-law

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.2 2026-04-20 18:47 UTC

This package is auto-updated.

Last update: 2026-04-20 18:52:00 UTC


README

Tests Packagist License Latest Stable Version

A focused migration backlog health check for Spatie's Laravel Health package.

This package provides a simple, direct health check to verify that your application's database migrations are up to date.

Features

  • Pending Migration Check: Automatically detects if there are any pending database migrations that haven't been run yet.
  • Migration Count: Reports the exact number of pending migrations in the health summary and meta data.
  • Detailed Meta: Lists a sample of pending migration filenames for easier debugging via JSON endpoints.

Installation

Require this package with composer:

composer require illuma-law/healthcheck-migration

Usage & Integration

Register the check inside your application's health service provider (e.g. AppServiceProvider or a dedicated HealthServiceProvider), alongside your other Spatie Laravel Health checks:

Basic Registration

use IllumaLaw\HealthCheckMigration\MigrationBacklogCheck;
use Spatie\Health\Facades\Health;

Health::checks([
    MigrationBacklogCheck::new(),
]);

Expected Result States

The check interacts with the Spatie Health dashboard and JSON endpoints using these states:

  • Ok: All database migrations have been successfully applied.
  • Failed: One or more database migrations are pending.

Testing

Run the test suite:

composer test

License

The MIT License (MIT). Please see License File for more information.