PHPackages                             onemigrator/onemigrator - 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. onemigrator/onemigrator

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

onemigrator/onemigrator
=======================

Database migration system with checksum support

07PHP

Since Jan 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/TheAceMotiur/OneMigrator)[ Packagist](https://packagist.org/packages/onemigrator/onemigrator)[ RSS](/packages/onemigrator-onemigrator/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

OneMigrator
===========

[](#onemigrator)

OneMigrator is a database migration system with checksum support.

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

[](#installation)

```
composer require onemigrator/onemigrator
```

Usage
-----

[](#usage)

### Creating a Migration

[](#creating-a-migration)

Create a migration file in your migrations directory. You can use either PHP or SQL files:

#### PHP Migration

[](#php-migration)

```
// migrations/001_create_users.php
use OneMigrator\Migration;

return new Migration(
    '001',                    // Version must be 3 digits
    'Create users table',     // Description
    "CREATE TABLE users (
        id INT AUTO_INCREMENT PRIMARY KEY,
        name VARCHAR(255),
        email VARCHAR(255) UNIQUE
    )"
);
```

#### SQL Migration

[](#sql-migration)

```
-- Description: Create users table
CREATE TABLE users (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255),
    email VARCHAR(255) UNIQUE
);
```

Save SQL files with version prefix: `001_create_users.sql`

### Running Migrations

[](#running-migrations)

```
use OneMigrator\MigrationManager;

$pdo = new PDO('mysql:host=localhost;dbname=myapp', 'user', 'password');
$manager = new MigrationManager($pdo, __DIR__ . '/migrations');

// Run migrations
$applied = $manager->migrate();

// Verify migration integrity
$invalid = $manager->verifyChecksums();
```

Features
--------

[](#features)

- Supports both PHP and SQL migration files
- Automatic checksum verification for migration integrity
- Transaction support for safe migration updates
- Version-based migration tracking
- Migrations table auto-creation
- PSR-4 autoloading
- PDO database support

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- PDO extension

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90847178?v=4)[Motiur Rahman](/maintainers/TheAceMotiur)[@TheAceMotiur](https://github.com/TheAceMotiur)

---

Top Contributors

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

### Embed Badge

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

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

###  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)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

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