PHPackages                             vcian/laravel-db-auditor - 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. vcian/laravel-db-auditor

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

vcian/laravel-db-auditor
========================

Database DB Auditor provide leverage to audit your MySql,sqlite, PostgreSQL database standards and also provide options to add constraints in table.

v2.2.1(1y ago)28535.1k↓33.3%29[2 issues](https://github.com/vcian/laravel-db-auditor/issues)[1 PRs](https://github.com/vcian/laravel-db-auditor/pulls)1MITPHPPHP ^8.1

Since Apr 17Pushed 1y ago3 watchersCompare

[ Source](https://github.com/vcian/laravel-db-auditor)[ Packagist](https://packagist.org/packages/vcian/laravel-db-auditor)[ RSS](/packages/vcian-laravel-db-auditor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (21)Used By (1)

[![Logo Laravel DB Auditor](art/laravel-db-auditor-hr.svg)](art/laravel-db-auditor-hr.svg)

[![Packagist License](https://camo.githubusercontent.com/7d4ac7a7ec94fd11772d6705f1612654b4fe1b9655b7ab553b123b9f876e6e17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f766369616e2f6c61726176656c2d64622d61756469746f723f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/7d4ac7a7ec94fd11772d6705f1612654b4fe1b9655b7ab553b123b9f876e6e17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f766369616e2f6c61726176656c2d64622d61756469746f723f7374796c653d666f722d7468652d6261646765)[![Total Downloads](https://camo.githubusercontent.com/8c246cae39b25661d4b85e7272ae40e0230d62d72dfe64307c16d4baabbb2439/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766369616e2f6c61726176656c2d64622d61756469746f723f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/vcian/laravel-db-auditor)

Introduction
------------

[](#introduction)

- This package provides to audit process of reviewing and evaluating a mysql, sqlite and postgresql database system.
- DB Auditor scan your mysql/sqlite/postgresql database and give insights of standards, constraints and provide option to add the constraints through CLI.
- The result of audit process shows list of tables &amp; columns which doesn't have proper standards.

Installation &amp; Usage
------------------------

[](#installation--usage)

> **Requires [PHP 8.0+](https://php.net/releases/) | [Laravel 8.0+](https://laravel.com/docs/8.x)**

Require Laravel DB Auditor using [Composer](https://getcomposer.org):

```
composer require --dev vcian/laravel-db-auditor
```

Usage:
------

[](#usage)

You can access DB Auditor using below artisan commands.

> #### **php artisan db:audit**
>
> [](#php-artisan-dbaudit)
>
> This command give you options to select feature like check the database standards or check the constraint.
>
> Now, you can skip tables which you don't want to check. Add skip table name in the .db-auditor.php file.

**Note:**

If you want to check standalone feature then you can execute below artisan command one by one.

> #### **php artisan db:constraint**
>
> [](#php-artisan-dbconstraint)
>
> This command gives you result with list of tables with primary,foreign,unique,index constraint.
>
> You can add more constraint to the table by seeing existing constraint with table.
>
> Below example give insights about the how to see constraints in table and how to add.
>
> Note :-
>
> - SQLite does not allow to define PRIMARY KEY or FOREIGN KEY into a existing table.
> - Add constraint option is not support for PostgreSQL. Will release soon.

[![Logo Laravel DB Auditor](art/db-constraint-select-table.png)](art/db-constraint-select-table.png)

[![Logo Laravel DB Auditor](art/db-constraint-display-table-details.png)](art/db-constraint-display-table-details.png)

[![Logo Laravel DB Auditor](art/db-constraint-add.png)](art/db-constraint-add.png)

[![Logo Laravel DB Auditor](art/db-constraint-result.png)](art/db-constraint-result.png)

---

> #### **php artisan db:standard**
>
> [](#php-artisan-dbstandard)
>
> This command give you result with list of table with standard follow indication.
>
> You can also see table specific column name which doesn't have standard followed.
>
> Below example give insights of database standards reports and suggestions.

[![Logo Laravel DB Auditor](art/db-standard-cmd-1.png)](art/db-standard-cmd-1.png)

[![Logo Laravel DB Auditor](art/db-standard-table-report-1.png)](art/db-standard-table-report-1.png)

[![Logo Laravel DB Auditor](art/db-standard-table-report-2.png)](art/db-standard-table-report-2.png)

---

> #### **php artisan db:track**
>
> [](#php-artisan-dbtrack)
>
> This command give you the track of the database files. Like when it's created with how many field in which table or whom created. this type of information show in the result.
>
> You can also filter with --table=, --action=, --status=. Note: "created by" return the github username and if it's not git repo than it shows system username.

[![Track Default](art/track-default.png)](art/track-default.png)

[![Track Default](art/track-table.png)](art/track-table.png)

[![Track Default](art/track-st-pending.png)](art/track-st-pending.png)

[![Track Default](art/track-ac-create.png)](art/track-ac-create.png)

**Note:**You have to set your database name with *DB\_DATABASE* parameter in you laravel .env file to use this feature.

ACCESS WEB PAGE
---------------

[](#access-web-page)

You can also access this feature through WEB UI. To access web UI, kindly execute below command.

php artisan vendor:publish --tag=public

select "db-auditor"

Route - To access the web UI "/laravel-db-auditor"

[![Laravel DB Auditor UI](art/db-standard-ui.png)](art/db-standard-ui.png)

[![Laravel DB Auditor UI](art/db-standard-details-ui.png)](art/db-standard-details-ui.png)

[![Laravel DB Auditor UI](art/db-constraint-ui.png)](art/db-constraint-ui.png)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

```
   We believe in
        👇
      ACT NOW
  PERFECT IT LATER
CORRECT IT ON THE WAY.

```

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 81% 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 ~26 days

Recently: every ~5 days

Total

19

Last Release

647d ago

Major Versions

v1.9.0 → v2.0.02024-07-18

PHP version history (2 changes)v1.0.0PHP ^8.0

v2.2.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/f19733b75e0a9bb01c70ec6302be389d4440d8afce378f998ea371ac6cfbb17a?d=identicon)[vcian](/maintainers/vcian)

---

Top Contributors

[![ruchit288](https://avatars.githubusercontent.com/u/28095255?v=4)](https://github.com/ruchit288 "ruchit288 (132 commits)")[![vc-urvin](https://avatars.githubusercontent.com/u/122852660?v=4)](https://github.com/vc-urvin "vc-urvin (14 commits)")[![sahildarji29](https://avatars.githubusercontent.com/u/30234093?v=4)](https://github.com/sahildarji29 "sahildarji29 (8 commits)")[![mayanksdudakiya](https://avatars.githubusercontent.com/u/34036151?v=4)](https://github.com/mayanksdudakiya "mayanksdudakiya (2 commits)")[![vc-dhavaljoshi](https://avatars.githubusercontent.com/u/37901172?v=4)](https://github.com/vc-dhavaljoshi "vc-dhavaljoshi (2 commits)")[![ahosker](https://avatars.githubusercontent.com/u/346166?v=4)](https://github.com/ahosker "ahosker (2 commits)")[![emresasi](https://avatars.githubusercontent.com/u/6942826?v=4)](https://github.com/emresasi "emresasi (1 commits)")[![ibrahim-sakr](https://avatars.githubusercontent.com/u/3674316?v=4)](https://github.com/ibrahim-sakr "ibrahim-sakr (1 commits)")[![us-urvin](https://avatars.githubusercontent.com/u/170420996?v=4)](https://github.com/us-urvin "us-urvin (1 commits)")

---

Tags

databasedatabase-constraintdatabase-standarddb-auditlaravelmysqlphpphplaraveldatabasemysqlsqlitepostgresqlpgsqlDB AuditDB StandardsDB Constraints

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vcian-laravel-db-auditor/health.svg)

```
[![Health](https://phpackages.com/badges/vcian-laravel-db-auditor/health.svg)](https://phpackages.com/packages/vcian-laravel-db-auditor)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[aura/sqlquery

Object-oriented query builders for MySQL, Postgres, SQLite, and SQLServer; can be used with any database connection library.

4572.9M34](/packages/aura-sqlquery)[aura/sqlschema

Provides facilities to read table names and table columns from a database using PDO.

41234.1k4](/packages/aura-sqlschema)[ramadan/easy-model

A Laravel package for enjoyably managing database queries.

101.6k](/packages/ramadan-easy-model)[moharrum/laravel-adminer

Adminer database management tool for your Laravel application.

451.0k](/packages/moharrum-laravel-adminer)

PHPackages © 2026

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