PHPackages                             pruanik/phinx-rows-migrations-generator - 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. pruanik/phinx-rows-migrations-generator

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

pruanik/phinx-rows-migrations-generator
=======================================

Migration generator of data rows for Phinx

5.0.4(6y ago)026MITPHPPHP ^7.2

Since Jul 9Pushed 6y agoCompare

[ Source](https://github.com/Pruanik/phinx-rows-migrations-generator)[ Packagist](https://packagist.org/packages/pruanik/phinx-rows-migrations-generator)[ Docs](https://github.com/Pruanik/phinx-rows-migrations-generator)[ RSS](/packages/pruanik-phinx-rows-migrations-generator/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (7)Versions (51)Used By (0)

Phinx migrations generator for data in tables
=============================================

[](#phinx-migrations-generator-for-data-in-tables)

Generate a migration by comparing your current database to your mapping information.

This fork of the main project ([Phinx-Migrations-Generator](https://github.com/odan/phinx-migrations-generator)) synchronizes the data in the given project tables. This could be useful for transferring data from system tables or settings stored in the database.

[Phinx](https://phinx.org/) cannot automatically generate migrations. Phinx creates "only" a class with empty `up`, `down` or `change` functions. You still have to write the migration manually.

In reality, you should rarely have to write migrations manually because the migration library should automatically generate migration classes by comparing your schema mapping information (i.e. how your database should look like) with your current database structure.

Install
-------

[](#install)

Via Composer

```
$ composer require pruanik/phinx-rows-migrations-generator --dev

```

Usage
-----

[](#usage)

### Generating migrations

[](#generating-migrations)

On the first run, an inital schema and a migration class is generated. The `schema.php` file contains the previous database schema and is getting compared with the current schema. Based on the difference, a Phinx migration class is generated.

```
$ vendor/bin/phinx-rows-migrations generate --overwrite

```

By executing the `generate` command again, only the difference to the last schema is generated.

Parameters
----------

[](#parameters)

ParameterValuesDefaultDescription--namestringThe class name.--overwriteboolOverwrite schema.php file.--path string(from phinx)Specify the path in which to generate this migration.--environment or -estring(from phinx)The target environment.### Running migrations

[](#running-migrations)

The [Phinx migrate command](http://docs.phinx.org/en/latest/commands.html#the-migrate-command) runs all of the available migrations.

```
$ vendor/bin/phinx migrate

```

Configuration
-------------

[](#configuration)

The phinx-migrations-generator uses the configuration of phinx.

Migration configuration
-----------------------

[](#migration-configuration)

ParameterValuesDefaultDescriptionforeign\_keysboolfalseEnable or disable foreign key migrations.### Example configuration

[](#example-configuration)

You can find example config in repo: tests/phinx.php.example

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 91.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 ~23 days

Recently: every ~0 days

Total

49

Last Release

2513d ago

Major Versions

0.7.0 → 1.0.02017-04-04

1.2.0 → 2.0.02017-05-02

2.7.0 → 3.0.02018-07-03

3.1.0 → 4.0.02018-12-24

4.0.5 → 5.0.02019-08-11

PHP version history (3 changes)0.0.1PHP ^5.6 || ^7.0

2.1.4PHP ^7.0

4.0.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19413023?v=4)[Pavel](/maintainers/pruanik)[@Pruanik](https://github.com/Pruanik)

---

Top Contributors

[![odan](https://avatars.githubusercontent.com/u/781074?v=4)](https://github.com/odan "odan (305 commits)")[![Pruanik](https://avatars.githubusercontent.com/u/19413023?v=4)](https://github.com/Pruanik "Pruanik (15 commits)")[![lucien144](https://avatars.githubusercontent.com/u/5161085?v=4)](https://github.com/lucien144 "lucien144 (4 commits)")[![rasmusbe](https://avatars.githubusercontent.com/u/2124386?v=4)](https://github.com/rasmusbe "rasmusbe (3 commits)")[![akalineskou](https://avatars.githubusercontent.com/u/3526365?v=4)](https://github.com/akalineskou "akalineskou (3 commits)")[![MASNathan](https://avatars.githubusercontent.com/u/2139464?v=4)](https://github.com/MASNathan "MASNathan (1 commits)")[![BLaDZer](https://avatars.githubusercontent.com/u/13044587?v=4)](https://github.com/BLaDZer "BLaDZer (1 commits)")

---

Tags

migrationdatadatabasegeneratormysqlmigrationsphinxrows

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/pruanik-phinx-rows-migrations-generator/health.svg)

```
[![Health](https://phpackages.com/badges/pruanik-phinx-rows-migrations-generator/health.svg)](https://phpackages.com/packages/pruanik-phinx-rows-migrations-generator)
```

###  Alternatives

[odan/phinx-migrations-generator

Migration generator for Phinx

233889.6k24](/packages/odan-phinx-migrations-generator)[robmorgan/phinx

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

4.5k47.9M443](/packages/robmorgan-phinx)[camcima/php-mysql-diff

14742.7k](/packages/camcima-php-mysql-diff)[smrtr/mysql-version-control

A crude version control system for mysql written in php

221.4k](/packages/smrtr-mysql-version-control)

PHPackages © 2026

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