This PR adds a new feature to the package: health checks.
The backup:restore command already fails, if the backup couldn't be downloaded, extracted or imported. But what if the import process succeeds but the database is in a non-nominal state?
With health checks, we can ensure that the database contains the tables or data, to confirm that the restore process was truly successful.
The package ships with a DatabaseHasTables-check to ensure the database contains at least one databae table. This check is the simplest form of a health check and doesn't make any assumptions how an app of the package consumer works.
Consumers are encouraged to write their own health checks for their applications. For example, one could write a check that ensures, that the database contains data from yesterday; assuming one creates daily backups and runs the restore command on a daily basis. (eg. through Laravel's schedule feature or GitHub Actions).
TODOs
[x] Update comment in config
[x] Write documentation about feature in README
This feature has been heavily inspired by Spatie's laravel-health package.
This PR adds a new feature to the package: health checks.
The
backup:restore
command already fails, if the backup couldn't be downloaded, extracted or imported. But what if the import process succeeds but the database is in a non-nominal state?With health checks, we can ensure that the database contains the tables or data, to confirm that the restore process was truly successful. The package ships with a
DatabaseHasTables
-check to ensure the database contains at least one databae table. This check is the simplest form of a health check and doesn't make any assumptions how an app of the package consumer works.Consumers are encouraged to write their own health checks for their applications. For example, one could write a check that ensures, that the database contains data from yesterday; assuming one creates daily backups and runs the restore command on a daily basis. (eg. through Laravel's schedule feature or GitHub Actions).
TODOs
This feature has been heavily inspired by Spatie's laravel-health package.