PHPackages                             ingenerator/phinx-lightweight - 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. ingenerator/phinx-lightweight

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

ingenerator/phinx-lightweight
=============================

Very simple SQL-based database migrations tool - a heavily stripped down fork of robmorgan/phinx

v1.4.0(3mo ago)017.8k↓39.3%1MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Oct 20Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/ingenerator/phinx-lightweight)[ Packagist](https://packagist.org/packages/ingenerator/phinx-lightweight)[ Docs](https://github.com/ingenerator/phinx-lightweight)[ RSS](/packages/ingenerator-phinx-lightweight/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (8)Dependencies (5)Versions (11)Used By (0)

🪓 phinx-lightweight 🪓 (VERY) Simple PHP Database Migrations
===========================================================

[](#axe-phinx-lightweight-axe-very-simple-php-database-migrations)

phinx-lightweight is a tool to manage and apply a sequence of migrations to your database. Migrations are written as PHP classes, and can execute SQL statements, compare &amp; coalesce data, pull in constants and values from your application code, etc.

phinx-lightweight has (and will always have) the bare minimum of third-party dependencies, and can be used with any app or framework.

### DO NOT USE THIS PACKAGE WITHOUT READING THIS

[](#do-not-use-this-package-without-reading-this)

This is a permanent hard fork from [robmorgan/phinx](https://github.com/cakephp/phinx) at v0.9.3. If you are migrating from phinx, you should be aware that we have made fundamental changes to the upstream version, notably:

- Migration classes will usually execute explicit SQL commands to modify the database. We have removed Phinx's entire database modelling layer and many schema manipulation helper functions. You can, of course, implement any helper functions that are useful for your app e.g. by using a custom base migration class.
- phinx-lightweight only supports MySQL (or MySQL compatible) databases over PDO, all other drivers have been removed.
- There is no mechanism for automatically rolling back migrations. Rolling back database migrations is hard, and often not as simple as applying the opposite statements in reverse. Rolling back also loses history and can leave the database in an unexpected state for the next migration. We enforce a roll-forwards-only strategy : if a migration does not work as expected in production you will need to write, commit, and deploy a new migration to get you from where you are now to where you want to be.
- We have removed functionality for seeding database content. Seeds should not be running in production and are (in our opinion) not the concern of a database migration tool. If you want to seed a development database, use one of the tools designed for that purpose.

See the changelog for more information on removed functionality.

### Documentation

[](#documentation)

See the information in the `docs` folder. Note that the online documentation for phinx covers a number of features that are not present in phinx-lightweight.

---

### License

[](#license)

(The MIT license)

Copyright (c) 2017 Rob Morgan Copyright (c) 2022 inGenerator Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance82

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 56.9% 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 ~151 days

Recently: every ~126 days

Total

9

Last Release

96d ago

PHP version history (4 changes)v1.0-BETAPHP ~8.0.0 || ~8.1.0 || ~8.2.0

v1.2.0PHP ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

v1.3.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

v1.4.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

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

---

Top Contributors

[![robmorgan](https://avatars.githubusercontent.com/u/178939?v=4)](https://github.com/robmorgan "robmorgan (796 commits)")[![shadowhand](https://avatars.githubusercontent.com/u/38203?v=4)](https://github.com/shadowhand "shadowhand (171 commits)")[![rquadling](https://avatars.githubusercontent.com/u/12801?v=4)](https://github.com/rquadling "rquadling (103 commits)")[![acoulton](https://avatars.githubusercontent.com/u/416566?v=4)](https://github.com/acoulton "acoulton (38 commits)")[![craig410](https://avatars.githubusercontent.com/u/1156379?v=4)](https://github.com/craig410 "craig410 (29 commits)")[![cyrusboadway](https://avatars.githubusercontent.com/u/1457501?v=4)](https://github.com/cyrusboadway "cyrusboadway (26 commits)")[![ADmad](https://avatars.githubusercontent.com/u/142658?v=4)](https://github.com/ADmad "ADmad (25 commits)")[![jbourdin](https://avatars.githubusercontent.com/u/1675069?v=4)](https://github.com/jbourdin "jbourdin (19 commits)")[![ondrejmirtes](https://avatars.githubusercontent.com/u/104888?v=4)](https://github.com/ondrejmirtes "ondrejmirtes (18 commits)")[![archer308](https://avatars.githubusercontent.com/u/1085165?v=4)](https://github.com/archer308 "archer308 (16 commits)")[![trilopin](https://avatars.githubusercontent.com/u/4096774?v=4)](https://github.com/trilopin "trilopin (15 commits)")[![dereuromark](https://avatars.githubusercontent.com/u/39854?v=4)](https://github.com/dereuromark "dereuromark (12 commits)")[![mackstar](https://avatars.githubusercontent.com/u/197328?v=4)](https://github.com/mackstar "mackstar (12 commits)")[![czogori](https://avatars.githubusercontent.com/u/892292?v=4)](https://github.com/czogori "czogori (11 commits)")[![zuker](https://avatars.githubusercontent.com/u/476388?v=4)](https://github.com/zuker "zuker (10 commits)")[![bartekrylko](https://avatars.githubusercontent.com/u/7151921?v=4)](https://github.com/bartekrylko "bartekrylko (10 commits)")[![JayPHP](https://avatars.githubusercontent.com/u/18351805?v=4)](https://github.com/JayPHP "JayPHP (9 commits)")[![f3ath](https://avatars.githubusercontent.com/u/831399?v=4)](https://github.com/f3ath "f3ath (8 commits)")[![lorenzo](https://avatars.githubusercontent.com/u/37621?v=4)](https://github.com/lorenzo "lorenzo (7 commits)")[![Iandenh](https://avatars.githubusercontent.com/u/2911923?v=4)](https://github.com/Iandenh "Iandenh (7 commits)")

---

Tags

databasemigrationsdbdatabase migrationsphinx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ingenerator-phinx-lightweight/health.svg)

```
[![Health](https://phpackages.com/badges/ingenerator-phinx-lightweight/health.svg)](https://phpackages.com/packages/ingenerator-phinx-lightweight)
```

###  Alternatives

[robmorgan/phinx

Phinx makes it ridiculously easy to manage the database migrations for your PHP app.

4.5k46.2M405](/packages/robmorgan-phinx)[masom/lhm

Large Hadron Migrator for phinx

309.3k](/packages/masom-lhm)[perplorm/perpl

Perpl is an improved and still maintained fork of Propel2, an open-source Object-Relational Mapping (ORM) for PHP.

203.7k](/packages/perplorm-perpl)

PHPackages © 2026

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