Download the PHP package doesntmattr/mongodb-migrations-bundle without Composer
On this page you can find all versions of the php package doesntmattr/mongodb-migrations-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download doesntmattr/mongodb-migrations-bundle
More information about doesntmattr/mongodb-migrations-bundle
Files in doesntmattr/mongodb-migrations-bundle
Package mongodb-migrations-bundle
Short Description Symfony MongoDBMigrationsBundle
License MIT
Homepage http://github.com/doesntmattr/mongodb-migrations-bundle
Informations about the package mongodb-migrations-bundle
MongoDB Migrations Bundle
This bundle integrates the MongoDB Migrations library into Symfony to get you set up more quickly.
It was moved to the doesntmattr organisation from antimattr/mongodb-migrations-bundle to continue maintenance (See issue 16).
The original authors are @rcatlin and @matthewfitz
PHP Version Support
If you require php 5.6 support use version ^1.0
. Version ^3.0
requires at least php 7.1. The 1.x
releases will only receive bug fixes.
Installation
Install with composer:
then enable the bundle in AppKernel.php
by including the following:
Configuration
Add following configuration lines to config.yml
file.
Container Aware Migrations
In some cases you might want to access some services you have defined in the container. For example you may want to use a Factory to create new entities in the structure you need.
To get access to the container simply implement the ContainerAwareInterface including the required method setContainer()
:
MongoDB Cursor Timeouts
In some cases you may need the Cursor timeout to be extended. If so, add the MongoDB option ['socketTimeoutMs' => -1]
to your update method.
Features
For a full list of available features, see the README.md in the MongoDB Migrations library:
https://github.com/doesntmattr/mongodb-migrations/blob/master/README.md
Differences from the underlying library are limited to the Console commands, namely database configurations are handled by Symfony's Dependency injection container, so you don't pass them as command line args.
Examples of the Command Line args with the difference below:
Generate a New Migration
Status of Migrations
Migrate all Migrations
This is what you will execute during your deployment process.
Execute a Single Migration
Use --replay
if you need to re-run an executed migration.
Version Up or Down
Is your migration history out of sync for some reason? You can manually add or remove a record from the history without running the underlying migration.
You can delete
You can add
All versions of mongodb-migrations-bundle with dependencies
doesntmattr/mongodb-migrations Version ^3.0
doctrine/mongodb-odm-bundle Version ^3.0 || ^4.0
symfony/framework-bundle Version ^3.4 || ^4.0 || ^5.0
symfony/console Version ^3.4 || ^4.0 || ^5.0