PHPackages                             jinnguyen/puja-migration - 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. jinnguyen/puja-migration

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

jinnguyen/puja-migration
========================

Puja-Migration is a database migration php library, supports both file sql and php

v1.1.0(9y ago)016Apache License 2.0PHP

Since Jan 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/jinnguyen/puja-migration)[ Packagist](https://packagist.org/packages/jinnguyen/puja-migration)[ RSS](/packages/jinnguyen-puja-migration/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

puja-migration
==============

[](#puja-migration)

Puja-Migration is a database migration php library, supports both file sql and php

**Install:**

```
composer require jinnguyen/puja-migration
```

**Usage:**

```
include '/path/to/vendor/autoload.php';
use Puja\Migration\Migrate;
```

**Example:**

```
// Configure DB
use Puja\Db\Adapter;

new \Puja\Db\Adapter(array(
    'write_adapter_name' => 'master',
    'adapters' => array(
        'default' => array(
            'host' => 'localhost',
            'username' => 'root',
            'password' => '123',
            'dbname' => 'fwcms',
            'charset' => 'utf8',
        ),
        'master' => array(
            'host' => 'localhost',
            'username' => 'root',
            'password' => '123',
            'dbname' => 'fwcms',
            'charset' => 'utf8',
        )
    )
));

// configure migration
new \Puja\Migration\Migrate(array(
    'table' => 'puja_migration', // db table name that store migration tracking information
    'dir' => __DIR__ . '/migrations/', // the folder store migration files
    'create_table' => true, // if true, the query "CREATE TABLE " will run, should enable at the first time and disable from second time.
));
```

**Note\***

1\. THE ORDER OF MIGRATION FILES ARE VERY IMPORTANT

So pls follow the file name conversation: - The name should begin by a numeric, e.g: 0-launched-project.sql, 1-update.sql, 2-data-fix.php,....
```
As above example,  0-launched-project.sql is  run first then 1-update.sql then 2-data-fix.php

```

2\. The php files are not show log message as default, if you want to show the log message you can use $this-&gt;addStament('Message'); // check in demo/3.php

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

3396d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25e5bd31b5dd70d47cbdc738bded06dbabfba3d584acce63c2c4b4fb7847f39d?d=identicon)[jinnguyen](/maintainers/jinnguyen)

---

Top Contributors

[![linhnmt](https://avatars.githubusercontent.com/u/10231628?v=4)](https://github.com/linhnmt "linhnmt (2 commits)")[![linhnnmt](https://avatars.githubusercontent.com/u/162856460?v=4)](https://github.com/linhnnmt "linhnnmt (2 commits)")

---

Tags

migrationdatabase-migrationpujaphp migration

### Embed Badge

![Health badge](/badges/jinnguyen-puja-migration/health.svg)

```
[![Health](https://phpackages.com/badges/jinnguyen-puja-migration/health.svg)](https://phpackages.com/packages/jinnguyen-puja-migration)
```

###  Alternatives

[rector/rector

Instant Upgrade and Automated Refactoring of any PHP code

10.3k123.1M6.0k](/packages/rector-rector)[kitloong/laravel-migrations-generator

Generates Laravel Migrations from an existing database

2.9k7.4M24](/packages/kitloong-laravel-migrations-generator)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M262](/packages/ssch-typo3-rector)[odan/phinx-migrations-generator

Migration generator for Phinx

235847.8k23](/packages/odan-phinx-migrations-generator)[dragon-code/laravel-deploy-operations

Performing any actions during the deployment process

240173.5k2](/packages/dragon-code-laravel-deploy-operations)[cybercog/laravel-clickhouse

ClickHouse migrations for Laravel

163166.8k](/packages/cybercog-laravel-clickhouse)

PHPackages © 2026

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