This page was automatically generated from this file on GitHub on Thu 23 Jun 2016 12:23:19 PM UTC


  • Added support for writing to output. This is backwards compatible for any migration that uses the trait Mongrate\Migration\Migration, as suggested by our example migration. Usage:

      public function up(Database $db)
          // ... your migration code here.
          // ... say you are adding a field to a user, the usage would be:
          $this->output->writeln(sprintf('Added field %s to user %s with value %s', 'newFieldName', $user['email'], $newValue));


  • Added support for DBRef objects in YML test files. Example usage:

              name: Marlow
              country: MongoDBRef(Countries,aaaaaaaaaaaa111111111111)
              _id: MongoId(aaaaaaaaaaaa111111111111)
              name: United Kingdom
              continent: MongoDBRef(Continents,bbbbbbbbbbbb222222222222)
              _id: MongoId(bbbbbbbbbbbb222222222222)
              name: Europe


  • Added new command, self-update, which updates the executable to the latest version.
  • Misc bug fixes and user experience improvements.
  • Ended official testing support for PHP 5.4.
  • The executable Phar file is now about 50% smaller.


  • Added new command, test-all, which tests all migrations.


  • The project has a new official website:
  • Added new command, up-all, which applies all remaining migrations.
  • New recommended method of installation that doesn’t require the downloading of the source code. See
  • New recommended method of configuration: /etc/mongrate.yml. See
  • Internal refactoring allows extension of a service, and re-use of code internally.


  • Added --force option to the up and down commands.
  • Added --pretty option to the test command.
  • Added validation for migration names, to prevent names over 49 characters being entered (they cause problems).


  • The list-migrations command now shows whether each migration has been applied.


  • Feature: Write tests for your migrations in YML format. See resources/examples/UpdateAddressStructure for an example. Run the test with ./mongrate test UpdateAddressStructure

  • The structure of the migrations directory has changed to allow future features. To update your migrations directory, run this (change mv to git mv if your migrations are in a Git reposistory):

      for i in $(ls migrations/*.php); do \
          dir=`sed 's/\.php//' <<< $i`; \
          mkdir $dir; \
          mv $i $dir/Migration.php; \