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 1mo ago

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

Maintenance32

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://www.gravatar.com/avatar/06a5ebf858448587df94f528d7b88b16c2cc03f275d4fe033a283b98e7da8b10?d=identicon)[TheAceMotiur](/maintainers/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

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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