PHPackages                             ottosmops/dbcheck - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. ottosmops/dbcheck

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

ottosmops/dbcheck
=================

check database for invalid foreign keys

v1.0.3(9y ago)047[1 PRs](https://github.com/ottosmops/dbcheck/pulls)MITPHPPHP ~5.6|~7.0

Since Apr 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ottosmops/dbcheck)[ Packagist](https://packagist.org/packages/ottosmops/dbcheck)[ Docs](https://github.com/ottosmops/dbcheck)[ RSS](/packages/ottosmops-dbcheck/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

db:check (analyze invalid foreign keys)
=======================================

[](#dbcheck-analyze-invalid-foreign-keys)

[![Latest Stable Version](https://camo.githubusercontent.com/d7eaa72b542623894a98fd482515e9d3f94bdc50decfbce1c3a88aa7e11b47f4/68747470733a2f2f706f7365722e707567782e6f72672f6f74746f736d6f70732f6462636865636b2f76)](//packagist.org/packages/ottosmops/dbcheck) [![Total Downloads](https://camo.githubusercontent.com/5de4dd9a94ae836a0422c1f66cc554ccfc9ad9389c251c7563e5ce0895eb9f40/68747470733a2f2f706f7365722e707567782e6f72672f6f74746f736d6f70732f6462636865636b2f646f776e6c6f616473)](//packagist.org/packages/ottosmops/dbcheck) [![Latest Unstable Version](https://camo.githubusercontent.com/984ae582b2a70ec2d95c74fe9e42d0906109ff555949dc39e0c8af17a020335a/68747470733a2f2f706f7365722e707567782e6f72672f6f74746f736d6f70732f6462636865636b2f762f756e737461626c65)](//packagist.org/packages/ottosmops/dbcheck) [![License](https://camo.githubusercontent.com/9bf0639ee97da07a3d2f1d8dc53920cc4aa298571e45b770df725ca580180e2e/68747470733a2f2f706f7365722e707567782e6f72672f6f74746f736d6f70732f6462636865636b2f6c6963656e7365)](//packagist.org/packages/ottosmops/dbcheck)

This package adds a `db:check` command to a laravel instance, which checks for invalid foreign keys in the database (mysql). It implements this [stored procedure](http://stackoverflow.com/questions/2250775/force-innodb-to-recheck-foreign-keys-on-a-table-tables).

Install
-------

[](#install)

Via Composer

```
$ composer require 'ottosmops/dbcheck:1.*'
```

Add `Ottosmops\Dbcheck\DbcheckServiceProvider::class,` to the providers-array in `config/app.php`.

Usage
-----

[](#usage)

```
php artisan db:check
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

4

Last Release

3322d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76f31e7e6772db47a91388ed82840fae1fa57185bb82a64924bb3839697222c2?d=identicon)[ottosmops](/maintainers/ottosmops)

---

Top Contributors

[![ottosmops](https://avatars.githubusercontent.com/u/4144389?v=4)](https://github.com/ottosmops "ottosmops (10 commits)")

---

Tags

laravelmysqlottosmopsdbcheckinvalid foreign keys

### Embed Badge

![Health badge](/badges/ottosmops-dbcheck/health.svg)

```
[![Health](https://phpackages.com/badges/ottosmops-dbcheck/health.svg)](https://phpackages.com/packages/ottosmops-dbcheck)
```

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k25.2M34](/packages/kirschbaum-development-eloquent-power-joins)[awssat/laravel-sync-migration

Laravel tool helps to sync migrations without refreshing the database

10923.2k](/packages/awssat-laravel-sync-migration)[baril/sqlout

MySQL fulltext driver for Laravel Scout.

4512.9k](/packages/baril-sqlout)[moharrum/laravel-adminer

Adminer database management tool for your Laravel application.

451.0k](/packages/moharrum-laravel-adminer)[mpyw/laravel-mysql-system-variable-manager

A tiny extension of MySqlConnection that manages session system variables

115.8k](/packages/mpyw-laravel-mysql-system-variable-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
