PHPackages                             webandco/flow-migrate-database - 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. webandco/flow-migrate-database

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

webandco/flow-migrate-database
==============================

0.0.1(4y ago)104PHP

Since May 4Pushed 4y ago2 watchersCompare

[ Source](https://github.com/webandco/flow-migrate-database)[ Packagist](https://packagist.org/packages/webandco/flow-migrate-database)[ RSS](/packages/webandco-flow-migrate-database/feed)WikiDiscussions main Synced today

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

Webandco.MigrateDatabase
========================

[](#webandcomigratedatabase)

Neos Flow plugin to run doctrine migrations and copy rows from a source to a destination database.

### Table of contents

[](#table-of-contents)

- [Quickstart](#quickstart)
- [Introduction](#introduction)
- [Command Line Interface](#command-line-interface)
- [Performance](#performance)
- [License](#license)

Quickstart
----------

[](#quickstart)

1. **Install this package using composer:**

```
composer require webandco/flow-migrate-database

```

(or by adding the dependency to the composer manifest of an installed package)

2. **Configure source and destination database**

```
 Webandco:
   MigrateDatabase:
     connections:
       source:
         persistence:
           doctrine:
             # secondLevelCache is needed by the entitymanager
             secondLevelCache:
               enable: false
           backendOptions:
             driver: pdo_mysql
             dbname: docker
             user: someuser
             password: somepassword
             host: mysql
             charset: 'UTF8'
             defaultTableOptions:
               charset: 'UTF8'
       destination:
         persistence:
           doctrine:
             # secondLevelCache is needed by the entitymanager
             secondLevelCache:
               enable: false
           backendOptions:
             driver: pdo_pgsql
               dbname: docker
               user: user
               password: pwd
               host: postgres
               charset: 'UTF8'
               defaultTableOptions:
                 charset: 'UTF8'
```

3. **Configure commands to create table structure**

```
  Webandco:
    MigrateDatabase:
      preprocess:
        commands:
          doctrineMigrate:
            command: 'doctrine:migrate'
          someFlowpackJobQueue:
            command: 'queue:setup'
            arguments:
              queue: 'jobQueueName'
```

4. **Create table structure in destination**

```
./flow migration:createStructure

```

5. **Copy rows from source to destination**

```
./flow migration:copyTables

```

Introduction
------------

[](#introduction)

This package is meant to be installed temporarily for as long as needed to finish the migration. The migration is split in two stages:

1. Create the destination table structures, e.g. by using the command `doctrine:migrate` on the destination database
2. Copy the rows from the source database to the destination

For 1. to work on the destination database a custom `EntityManagerFactory` is used which selects database connection settings based on an environment variable.

This package does not interfere with the configured database in `Neos.Flow.persistence`, but uses custom settings for the source and destination database.
Those custom datbase settings have the same configuration options as to those of `Neos.Flow.persistence`.

Command Line Interface
----------------------

[](#command-line-interface)

Use the `webandco.migratedatabase:migration:*` commands to run the migration:

CommandDescriptionmigration:createStructureRun configured Webandco.MigrateDatabase.structure.commands on the destination databasemigration:copytablesCopy rows from the source to the destination database and update sequences as neededPerformance
-----------

[](#performance)

The insert is split into chunks and sent via `INSERT INTO [table] (col1,col2,....) VALUES (...),(...),(...),..` to the destination database.
A local test migration of around 2.6 mio rows from MySql to PostgreSQL took around 5 mins.

License
-------

[](#license)

This package is licensed under the MIT license

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

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

1520d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2139456?v=4)[web&amp;co](/maintainers/webandco)[@webandco](https://github.com/webandco)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/webandco-flow-migrate-database/health.svg)

```
[![Health](https://phpackages.com/badges/webandco-flow-migrate-database/health.svg)](https://phpackages.com/packages/webandco-flow-migrate-database)
```

###  Alternatives

[neos/neos

An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

1151.0M770](/packages/neos-neos)[neos/neos-development-collection

Neos packages in a joined repository for pull requests.

267103.9k1](/packages/neos-neos-development-collection)[neos/media

The Media package

101.2M53](/packages/neos-media)

PHPackages © 2026

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