PHPackages                             smalldb/libchangelog\_sql - 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. smalldb/libchangelog\_sql

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

smalldb/libchangelog\_sql
=========================

Changelog.SQL is simple and elegant tool to maintain database changes. This package is a library meant to be integrated into your project

v1.2(9y ago)1141Apache-2.0PHP

Since Jun 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/smalldb/libchangelog-sql)[ Packagist](https://packagist.org/packages/smalldb/libchangelog_sql)[ RSS](/packages/smalldb-libchangelog-sql/feed)WikiDiscussions master Synced 2mo ago

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

Changelog.SQL
=============

[](#changelogsql)

Changelog.SQL is simple tool to maintain changes in database. It is based on directory of SQL scripts and simple SQL table where are recorded already executed scripts.

This package contains a library meant to be integrated into your project. Just initialize whatever framework you use and call Smalldb\\ChangelogSql\\CliMain::main()`.

See cascade plugin changelog\_sql for usage example.

Usage
-----

[](#usage)

When database is modified, place SQL script which performs this modification into `app/database/changelog.sql` directory and commit it. This script will remain there forever.

After deploy on a server run your changelog-sql script and you will see SQL code required to reproduce all changes on the server.

@warning You must set your client to stop on errors. Otherwise things go bad.

@note **The Trick:** Each file has simple insert at its end. This insert records successful execution of given script into database. Filename specified in this insert must match filename of the script.

### Example of the Script

[](#example-of-the-script)

```
ALTER ... whatever you need;
UPDATE ... data that needs to be modified;

--
INSERT INTO `about_changelog`
SET `filename` = '0000-00-00-about_changelog.sql';

```

@warning Do not forget final semicolon (;).

Init scripts
------------

[](#init-scripts)

In `app/database/changelog.sql/init` directory can be placed scripts which should be executed every time something is changed in database.

License
-------

[](#license)

The most of the code is published under Apache 2.0 license. See [LICENSE](doc/license.md) file for details.

Contribution guidelines
-----------------------

[](#contribution-guidelines)

There is no bug tracker yet, so send me an e-mail and we will figure it out.

If you wish to send me a patch, please create a Git pull request or send a Git formatted patch via email.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

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 ~364 days

Total

3

Last Release

3618d ago

### Community

Maintainers

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

---

Top Contributors

[![jkufner](https://avatars.githubusercontent.com/u/16572?v=4)](https://github.com/jkufner "jkufner (37 commits)")

---

Tags

databasemigrationsphpsmalldbsql-script

### Embed Badge

![Health badge](/badges/smalldb-libchangelog-sql/health.svg)

```
[![Health](https://phpackages.com/badges/smalldb-libchangelog-sql/health.svg)](https://phpackages.com/packages/smalldb-libchangelog-sql)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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