PHPackages                             cycle/schema-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. cycle/schema-migrations-generator

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

cycle/schema-migrations-generator
=================================

Cycle ORM Migration generation

2.3.0(1y ago)3306.9k↑11.3%5[3 issues](https://github.com/cycle/schema-migrations-generator/issues)14MITPHPPHP &gt;=8.1

Since Sep 15Pushed 1y ago3 watchersCompare

[ Source](https://github.com/cycle/schema-migrations-generator)[ Packagist](https://packagist.org/packages/cycle/schema-migrations-generator)[ GitHub Sponsors](https://github.com/sponsors/cycle)[ RSS](/packages/cycle-schema-migrations-generator/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (6)Dependencies (10)Versions (9)Used By (14)

Cycle ORM - Migration Generator
===============================

[](#cycle-orm---migration-generator)

[![Latest Stable Version](https://camo.githubusercontent.com/02092ec1f897500c41e833bb1df4a97cfc2cb20bf02c5ef6811c4f7e62737dbd/68747470733a2f2f706f7365722e707567782e6f72672f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722f76657273696f6e)](https://packagist.org/packages/cycle/schema-migrations-generator)[![Build Status](https://github.com/cycle/schema-migrations-generator/workflows/build/badge.svg)](https://github.com/cycle/schema-migrations-generator/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/78e902b6775934642e2d81fa8e5b86b8c3e2a1715fcf202ad4f8a8dd0159a1cf/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d322e78)](https://scrutinizer-ci.com/g/cycle/schema-migrations-generator/?branch=2.x)[![Codecov](https://camo.githubusercontent.com/b6004c7dbf6b60d802fc3b4eb1beac65ad1fa13fd7ba1f356359cc3470d7b900/68747470733a2f2f636f6465636f762e696f2f67682f6379636c652f736368656d612d6d6967726174696f6e732d67656e657261746f722f67726170682f62616467652e737667)](https://codecov.io/gh/cycle/schema-migrations-generator)

By migration generator package you can automatically generate a set of migration files for Cycle ORM during schema compilation. In this case, you have the freedom to alter such migrations manually before running them.

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

[](#installation)

```
composer require cycle/schema-migrations-generator
```

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

[](#configuration)

```
use Cycle\Migrations;
use Cycle\Schema\Registry;
use Cycle\Schema\Definition\Entity;
use Cycle\Database;
use Cycle\Database\Config;
use Cycle\Schema\Generator\Migrations\GenerateMigrations;

$dbal = new Database\DatabaseManager(new Config\DatabaseConfig([
    'default' => 'default',
    'databases' => [
        'default' => [
            'connection' => 'sqlite'
        ]
    ],
    'connections' => [
        'sqlite' => new Config\SQLiteDriverConfig(
            connection: new Config\SQLite\MemoryConnectionConfig(),
            queryCache: true,
        ),
    ]
]));

$migrator = new Migrations\Migrator(
    $config,
    $dbal,
    new Migrations\FileRepository($config)
);

$registry = new Registry($dbal);
$registry->register(....);

$generator = new GenerateMigrations(
    $migrator->getRepository(),
    $migrator->getConfig()
);
```

Running
-------

[](#running)

Migration generator creates set of migrations needed to sync database schema with desired state. Each database will receive its own migration.

```
$generator->run($registry);
```

License:
--------

[](#license)

The MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~178 days

Total

9

Last Release

511d ago

Major Versions

1.0.0 → 2.0.02021-12-22

2.0.0 → 3.x-dev2023-01-12

PHP version history (3 changes)1.x-devPHP &gt;=7.2

2.0.0PHP &gt;=8.0

3.x-devPHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/796136?v=4)[Anton Tsitou](/maintainers/wolfy-j)[@wolfy-j](https://github.com/wolfy-j)

---

Top Contributors

[![wolfy-j](https://avatars.githubusercontent.com/u/796136?v=4)](https://github.com/wolfy-j "wolfy-j (31 commits)")[![roxblnfk](https://avatars.githubusercontent.com/u/4152481?v=4)](https://github.com/roxblnfk "roxblnfk (22 commits)")[![alexndr-novikov](https://avatars.githubusercontent.com/u/7372962?v=4)](https://github.com/alexndr-novikov "alexndr-novikov (9 commits)")[![msmakouz](https://avatars.githubusercontent.com/u/67324318?v=4)](https://github.com/msmakouz "msmakouz (9 commits)")[![gam6itko](https://avatars.githubusercontent.com/u/3841197?v=4)](https://github.com/gam6itko "gam6itko (8 commits)")[![butschster](https://avatars.githubusercontent.com/u/773481?v=4)](https://github.com/butschster "butschster (4 commits)")[![rauanmayemir](https://avatars.githubusercontent.com/u/9691?v=4)](https://github.com/rauanmayemir "rauanmayemir (3 commits)")[![SerafimArts](https://avatars.githubusercontent.com/u/2461257?v=4)](https://github.com/SerafimArts "SerafimArts (2 commits)")

---

Tags

database-migrationshacktoberfest

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/cycle-schema-migrations-generator/health.svg)

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

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

PHP DataMapper ORM and Data Modelling Engine

1.3k835.4k65](/packages/cycle-orm)[cycle/annotated

Cycle ORM Annotated Entities generator

28724.2k44](/packages/cycle-annotated)[wayofdev/laravel-cycle-orm-adapter

🔥 A Laravel adapter for CycleORM, providing seamless integration of the Cycle DataMapper ORM for advanced database handling and object mapping in PHP applications.

3516.7k3](/packages/wayofdev-laravel-cycle-orm-adapter)[spiral/cycle-bridge

Cycle ORM integration package

18128.9k7](/packages/spiral-cycle-bridge)[cycle/migrations

Database migrations, migration scaffolding

20539.5k29](/packages/cycle-migrations)

PHPackages © 2026

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