PHPackages                             whatafunc/db-diff-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. whatafunc/db-diff-auditor

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

whatafunc/db-diff-auditor
=========================

Database change auditor for AI-assisted development

231PHPCI passing

Since Dec 18Pushed 5mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

db-diff-auditor
===============

[](#db-diff-auditor)

A PHP-based database schema auditing tool designed to work with MySQL and PostgreSQL. Its main purpose is to track changes in your database structure over time.

Philosophy and Intended Use Case
--------------------------------

[](#philosophy-and-intended-use-case)

While there are many powerful database migration frameworks available, `db-diff-auditor` is not intended to replace them. Instead, it is designed to fill a specific niche for developers who value simplicity, visibility, and control, especially in the following scenarios:

1. **For the Hands-On Developer:** Many developers prefer to make schema changes directly in their database client (like Sequel Pro, DBeaver, or the command line) and then want a quick and easy way to capture those changes in a version-controllable format. This tool is perfect for that workflow. It provides a code-based confirmation of your manual changes and generates the SQL to replicate them elsewhere.
2. **For AI-Assisted Development:** As AI tools become more common in the development process, there is a growing need for simple, focused tools to audit the changes they make. This tool provides a clear and auditable trail of any schema changes suggested or applied by an AI, allowing developers to maintain full visibility and control over their database structure.

In short, `db-diff-auditor` is about providing a lightweight, straightforward, and auditable bridge between your database and your codebase.

For Library Consumers
=====================

[](#for-library-consumers)

This section explains how to install and use this library in your own projects.

Installation
------------

[](#installation)

Before installing this library, ensure you have Composer, the PHP dependency manager, installed on your system.

To check if Composer is installed, open your terminal or command prompt and run:

```
composer -V
```

If Composer is not installed, you can follow the official installation guide:

You can then install the library via Composer:

```
composer require whatafunc/db-diff-auditor
```

Usage
-----

[](#usage)

You can use the `DbDiffAuditor` class in your own PHP projects to programmatically handle schema auditing.

```
