Symfony bundle for Mongrate
A Symfony bundle for Mongrate.
Mongrate Bundle is available via Composer.
composer require "amyboyd/mongrate"
Set your configuration in your Symfony application's config.yml:
mongrate: mongodb_server: 'mongodb://localhost:27017' mongodb_db: my_database migrations_directory: "%kernel.root_dir%/../migrations"
As always, you can use settings from
%...%. For example:
mongrate: mongodb_server: %mongodb_server% mongodb_db: %mongodb_db%_prod
See the commands available by running
app/console list mongrate
Generate a base migration backbone.
app/console mongrate:generate-migration <migration-name>
List all migrations and its statuses that indicates if the migrations was already applyed or not.
Allow you to test your migrations up and down.
app/console mongrate:test <up|down> <migration-name>
app/console mongrate:up <migration-name>
down migration that should rollback to previous state before applyed
app/console mongrate:down <migration-name>
Toggle a migration
app/console mongrate:toggle <migration-name>
Please submit pull requests on GitHub:
sudo curl http://get.sensiolabs.org/php-cs-fixer.phar -o /usr/local/bin/php-cs-fixer
Install the Git pre-commit hook:
ln -s ../../resources/pre-commit .git/hooks/pre-commit chmod a+x .git/hooks/pre-commit
To run the tests: