PHPackages                             mi/mongodb-migrations - 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. mi/mongodb-migrations

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

mi/mongodb-migrations
=====================

Library to migrate forward and backward in mongodb.

2.0.x-dev(10y ago)01.1kMITPHPPHP ^5.6|^7.0

Since Apr 25Pushed 10y agoCompare

[ Source](https://github.com/MovingImage24/mongodb-migrations)[ Packagist](https://packagist.org/packages/mi/mongodb-migrations)[ RSS](/packages/mi-mongodb-migrations/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (10)Versions (6)Used By (0)

MongoDB Migrations
==================

[](#mongodb-migrations)

[![Build Status](https://camo.githubusercontent.com/38dda65dfb4c37629c987a0aba30c0634ff57dbc10bbbd8b916afb3e6576b9f7/68747470733a2f2f7472617669732d63692e6f72672f4d6f76696e67496d61676532342f6d6f6e676f64622d6d6967726174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/MovingImage24/mongodb-migrations)[![Latest Stable Version](https://camo.githubusercontent.com/4e9612a71542d0ab599af86a894ebb2a1f2607333131f39c2e0bb2ae1b935ad4/68747470733a2f2f706f7365722e707567782e6f72672f6d692f6d6f6e676f64622d6d6967726174696f6e732f762f737461626c65)](https://packagist.org/packages/mi/mongodb-migrations)[![Latest Unstable Version](https://camo.githubusercontent.com/78de109b5d475df4337c51b247ae9c32adea58cd98812a4658aa698786e5984f/68747470733a2f2f706f7365722e707567782e6f72672f6d692f6d6f6e676f64622d6d6967726174696f6e732f762f756e737461626c65)](https://packagist.org/packages/mi/mongodb-migrations)[![Total Downloads](https://camo.githubusercontent.com/2f362df404a04790796a632a2a570e4576384bd1262ff8da9a204c44c4d86d3b/68747470733a2f2f706f7365722e707567782e6f72672f6d692f6d6f6e676f64622d6d6967726174696f6e732f646f776e6c6f616473)](https://packagist.org/packages/mi/mongodb-migrations)[![License](https://camo.githubusercontent.com/f9f049391d905cd4c6f91add68be75bfb928395fcaa2c8c78d7ca74bf3f548f6/68747470733a2f2f706f7365722e707567782e6f72672f6d692f6d6f6e676f64622d6d6967726174696f6e732f6c6963656e7365)](https://packagist.org/packages/mi/mongodb-migrations)

Overview
--------

[](#overview)

...

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

[](#installation)

### Composer

[](#composer)

#### for PHP 7 and greater with the new mongoDB-extension

[](#for-php-7-and-greater-with-the-new-mongodb-extension)

```
composer require mi/mongodb-migrations

```

#### for other PHP-Versions

[](#for-other-php-versions)

```
composer require mi/mongodb-migrations ^1.0.0@beta

```

### Puli-Bindings

[](#puli-bindings)

MY\_BUNDLE\_ALIAS = the alias of your bundle (for example `my_awesome_bundle`)

```
puli bind --class Mi\\MongoDb\\Migration\\DependencyInjection\\MigrationPlugin Matthias\\BundlePlugins\\BundlePlugin --param bundle-alias=
puli bind /mi/mongodb-migrations/*.xml mi/service
puli build

```

### Configuration

[](#configuration)

```
my_awesome_bundle:
    ...

    migration:
        path: '/path/to/version/class/directory'                            // path where versions will be constructed
        xml_path: '/path/to/version/service-definition/file'                // service-definitions where versions will be defined
        namespace: "namespace\\of\\generated\\versions"                     // namespace versions will be constructed with
        migration_collection: 'migration.collection.service.definition.id'  // need to be from type MongoCollection

```

### refresh autoloader

[](#refresh-autoloader)

add namespace `namespace\\of\\generated\\versions` to autoloader and execute

```
composer dump-autoload

```

Usage
-----

[](#usage)

### create version

[](#create-version)

```
console mi:mongo-db:migration:generate

```

### execute migration

[](#execute-migration)

```
console mi:mongo-db:migration:migrate

```

Contributing
------------

[](#contributing)

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

License
=======

[](#license)

This library is under the [MIT license](https://github.com/MovingImage24/mongodb-migrations/blob/master/LICENSE).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~0 days

Total

5

Last Release

3717d ago

Major Versions

v1.0.0-beta → v2.0.0-beta2016-04-25

v1.0.0-beta2 → 2.0.x-dev2016-04-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/0c191db55131753540dbf951972519e07fc90bef3a18d3a37a5b740e7aa64234?d=identicon)[mi24administrator](/maintainers/mi24administrator)

---

Top Contributors

[![Engerim](https://avatars.githubusercontent.com/u/1322557?v=4)](https://github.com/Engerim "Engerim (7 commits)")[![EyesOnlyNet](https://avatars.githubusercontent.com/u/5768289?v=4)](https://github.com/EyesOnlyNet "EyesOnlyNet (1 commits)")

---

Tags

pluginmigrationmongodbpuli

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mi-mongodb-migrations/health.svg)

```
[![Health](https://phpackages.com/badges/mi-mongodb-migrations/health.svg)](https://phpackages.com/packages/mi-mongodb-migrations)
```

###  Alternatives

[rector/rector-src

Instant Upgrade and Automated Refactoring of any PHP code

136406.3k14](/packages/rector-rector-src)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M91](/packages/mongodb-laravel-mongodb)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k45](/packages/friendsoftypo3-content-blocks)[doctrine/mongodb-odm

PHP Doctrine MongoDB Object Document Mapper (ODM) provides transparent persistence for PHP objects to MongoDB.

1.1k24.5M350](/packages/doctrine-mongodb-odm)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.0M391](/packages/ssch-typo3-rector)[api-platform/openapi

Models to build and serialize an OpenAPI specification.

404.2M83](/packages/api-platform-openapi)

PHPackages © 2026

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