PHPackages                             websupply/doctrine-rollback - 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. websupply/doctrine-rollback

ActiveNeos-package[Database &amp; ORM](/categories/database)

websupply/doctrine-rollback
===========================

0.1(3y ago)046PHP

Since Feb 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/wbsply/doctrine-rollback)[ Packagist](https://packagist.org/packages/websupply/doctrine-rollback)[ RSS](/packages/websupply-doctrine-rollback/feed)WikiDiscussions main Synced 1mo ago

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

Migration rollback with one simple command for Neos Flow
========================================================

[](#migration-rollback-with-one-simple-command-for-neos-flow)

Rollback the latest executed Doctrine migration by running

```
./flow doctrine:rollback

```

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

[](#installation)

```
composer require websupply/doctrine-rollback

```

How can this package help you?
------------------------------

[](#how-can-this-package-help-you)

Did you execute a database migration while developing, and want to run the `down` (rollback) direction, the command looks as such

```
./flow doctrine:migrationexecute --version  --direction down

```

With this package, you can run

```
./flow doctrine:rollback

```

And the latest applied migration, will be executed with the `down` direction

Dry run
-------

[](#dry-run)

By setting the `--dry-run` argument, the command will outpt what version it was meant to execute, but not actually execute it

Example output
--------------

[](#example-output)

This output, is based on running the migrations from Flows base distribution

```
$ ./flow doctrine:migrate

[HERE COMES ALL THE MIGRATION EXECUTED]

[warning] Migration Neos\Flow\Persistence\Doctrine\Migrations\Version20150611154419 was executed but did not result in any SQL statements.
[notice] finished in 2001.8ms, used 24M memory, 27 migrations executed, 94 sql queries

```

Now we are setup

```
$ ./flow doctrine:rollback --dry-run
DRY RUN: Rollback migration "Neos\Flow\Persistence\Doctrine\Migrations\Version20200908155620"

```

A dry run, telling us that version `20200908155620` will be the one to rollback

```
$ ./flow doctrine:rollback
Migrating down to Neos\Flow\Persistence\Doctrine\Migrations\Version20200908155620

     -> ALTER TABLE neos_flow_resourcemanagement_persistentresource ADD md5 VARCHAR(32) NOT NULL

[notice] finished in 151.7ms, used 24M memory, 1 migrations executed, 1 sql queries

```

Executing the rollback, rolling back the migration expected

```
$ ./flow doctrine:migrate
Migrating up to Neos\Flow\Persistence\Doctrine\Migrations\Version20200908155620

     -> ALTER TABLE neos_flow_resourcemanagement_persistentresource DROP md5

[notice] finished in 204.9ms, used 22M memory, 1 migrations executed, 1 sql queries

```

And running the `doctrine:migrate` command again, to re-apply it (imagine, that you changed something in your migration)

Support and sponsoring
----------------------

[](#support-and-sponsoring)

Work on this package is supported by the danish web company **WebSupply ApS**

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1188d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d66aba7c1bf21091eb3d635fb89ca47b740c81a121102da399df0123a976522?d=identicon)[sorenmalling](/maintainers/sorenmalling)

---

Top Contributors

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

---

Tags

flowframeworkneosflow

### Embed Badge

![Health badge](/badges/websupply-doctrine-rollback/health.svg)

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

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

MongoDB driver library

1.6k64.0M543](/packages/mongodb-mongodb)[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)[usmanhalalit/laracsv

A Laravel package to easily generate CSV files from Eloquent model.

6151.7M4](/packages/usmanhalalit-laracsv)

PHPackages © 2026

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