PHPackages                             unicate/rigatoni - 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. unicate/rigatoni

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

unicate/rigatoni
================

Rigatoni - A simple dish - made of fresh SQL migrations.

v1.1(5y ago)08[1 PRs](https://github.com/unicate/rigatoni/pulls)MITPHPCI failing

Since Jul 5Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/unicate/rigatoni)[ Packagist](https://packagist.org/packages/unicate/rigatoni)[ RSS](/packages/unicate-rigatoni/feed)WikiDiscussions master Synced 1w ago

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

[![alt text](img/logo.png "Rigatoni")](img/logo.png)

Rigatoni
========

[](#rigatoni)

> A simple dish - made of fresh SQL migrations.

What is it?
-----------

[](#what-is-it)

- Rigatoni manages SQL migrations.
- It uses plain old SQL files. No need to learn a new framework.
- It's heavily inspired by tools like [Flyway](https://flywaydb.org/) or [Phinx](https://phinx.org/).
- It should be easy and intuitive to use.
- Use it via commandline interface (CLI) or write your own integration.
- It can be used as stand-alone application to manage your DB migrations.
- It can be integrated into your project as composer package.

Rules
-----

[](#rules)

- Migrations are written in plain old SQL.
- There are only 3 types of migrations.
    - Versioned-Migrations: Only executed once and the filename needs to start with V and followed by the version.
    - Repeatable migrations: Executed every time the migration runs. The filename needs to start with R and is not versioned.
    - Undo-Migrations. The filename needs to start with U and followed by the version. It must be called with a specific version.
- Every Versioned-Migration should have a corresponding Undo-Migration.
- New Migrations are always in state PENDING.
- Each SQL statement of a migration will be executed separately.
    - If one statement fails, the whole migration will be marked as FAILED. All errors are listed in the migrations-table.
    - Successful executed migrations will be marked with SUCCESS.
- Versioned migrations will be executed in ascending order by version. Repeatable migrations are executed afterwards.
- If you want to revert a migration, call the Undo-Migration.
    - All Undo-Migrations with version &gt;= the passed version will be executed.
    - The reverted migration will be marked as UNDONE again.
    - The Undo-Migration is marked with SUCCESS.
- If you delete a migration entry from the migrations-table, but the migration-file still exists, it will be re-inserted as PENDING.
- Paths are relative to project root. It is assumed, that is where we find the composer.json file.

Commands
--------

[](#commands)

- init
    - Creates a new config file in project root directory.
- check
    - Checks the configuration, the DB connection and if the folder for the SQL migrations exists.
- setup
    - Creates a fresh table for the migration information.
- migrate
    - Executes the pending migrations.
- undo
    - Reverts executed migrations.

[![alt text](img/migrate-screen.png "Migrate screen")](img/migrate-screen.png)

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

[](#installation)

Installation Use Git or Composer:

```
git clone https://github.com/unicate/rigatoni.git my-project-name
composer install --no-dev

```

Use the option --no-dev if you just want to run migrations. (Other dependencies are only for testing.)

```
composer create-project unicate/rigatoni my-project-name --no-dev

```

Commands
--------

[](#commands-1)

Init - Creates a config file in your project root.

```
./rigatoni init

```

Check - Does some config and connection checking.

```
./rigatoni check

```

Info - Shows all entries from migration table.

```
./rigatoni info

```

Setup - Migrations-table will be created. (existing will be dropped).

```
./rigatoni setup

```

Migrate - Executes versioned and repeatable migrations.

```
./rigatoni migrate

```

Undo migration

```
./rigatoni undo 004

```

Own Integration
---------------

[](#own-integration)

In case you would like to write your own integration to use Rigatoni in your project just have a look at the MigrationFacade class and the methods provided.

[![alt text](img/class-diagram.png "Class diagram")](img/class-diagram.png)

Disclaimer &amp; License
------------------------

[](#disclaimer--license)

This project is released under the [MIT](https://raw.githubusercontent.com/unicate/licenses/master/MIT/MIT-Licence.txt) licence.

Thanks to The-Noun-Project for the logo:

Finally
-------

[](#finally)

> Now go and build something and **make people happy**!

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance53

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

2

Last Release

2140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e15376028270c8e0d82b2ae7c835c80c2a5577ea9ba59d16b03e5cf8881de6f0?d=identicon)[unicate](/maintainers/unicate)

---

Top Contributors

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

---

Tags

migrationphinxsql

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M263](/packages/ssch-typo3-rector)[guikingone/scheduler-bundle

A Symfony bundle that allows to schedule and create repetitive tasks

114217.4k](/packages/guikingone-scheduler-bundle)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)[swiftotter/driver

A database task-runner that helps you to turn production database into a staging/development database sandbox

6111.1k2](/packages/swiftotter-driver)[psx/sql

Generate type-safe PHP classes from your database

1773.4k4](/packages/psx-sql)

PHPackages © 2026

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