PHPackages                             asko/migrator - 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. asko/migrator

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

asko/migrator
=============

A simple database migration library.

v1.0.2(2y ago)1148MITPHPPHP &gt;=8.2

Since Jun 30Pushed 2y ago1 watchersCompare

[ Source](https://github.com/askonomm/migrator)[ Packagist](https://packagist.org/packages/asko/migrator)[ RSS](/packages/asko-migrator/feed)WikiDiscussions main Synced yesterday

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

Migrator
========

[](#migrator)

[![codecov](https://camo.githubusercontent.com/e195310b0e1b9dc1e67e91c586683e74b2effcbabce96e3f5317656046866bbe/68747470733a2f2f636f6465636f762e696f2f67682f61736b6f6e6f6d6d2f6d69677261746f722f67726170682f62616467652e7376673f746f6b656e3d366f4761393848417157)](https://codecov.io/gh/askonomm/migrator)

A simple, extendable database migration tool with out of box support for MySQL.

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

[](#installation)

```
composer require asko/migrator
```

Usage
-----

[](#usage)

Your migration files should be placed in a directory. Each migration file is just a regular SQL file with a `{up|down}.sql` extension. The migrations are run in file name order, so you should prefix the files numerically or with a timestamp, e.g `001_create_users_table.up.sql`.

```
use Asko\Migrator\Migrator;
use Asko\Migrator\Drivers\MysqlDriver;

$migrator = new Migrator('migrations_path', new MysqlDriver(...));

// Run migrations
$migrator->migrate();

// Revert last migration
$migrator->revert();
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

Total

3

Last Release

733d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17984167?v=4)[Alexey Skolyarov](/maintainers/asko)[@asko](https://github.com/asko)

---

Top Contributors

[![askonomm](https://avatars.githubusercontent.com/u/84135165?v=4)](https://github.com/askonomm "askonomm (5 commits)")

---

Tags

migrationsmysqlphp

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/asko-migrator/health.svg)

```
[![Health](https://phpackages.com/badges/asko-migrator/health.svg)](https://phpackages.com/packages/asko-migrator)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[pgvector/pgvector

pgvector support for PHP

198741.5k12](/packages/pgvector-pgvector)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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