This package is abandoned and no longer maintained. No replacement package was suggested.

Console wrapper for Baleen Migrations

0.5.1 2015-10-09 14:25 UTC


Build Status Code Coverage Scrutinizer Code Quality Packagist

Author License

Generic, customisable command-line wrapper for Baleen Migrations.


With Composer:

composer install baleen/cli

Baleen CLI is quite opinionated in its defaults, so it doesn't need extra configuration to run. So if you'd like to just test-drive the project, you can now jump straight to the "usage" section.

But you can customize almost anything through a configuration file. To create a configuration file, run the following:

./vendor/bin/baleen init

This will generate two files in your working directory:

  • .baleen.yml: the configuration file.
  • .baleen_versions: a simple file to keep track of which versions have been migrated. This can later be replaced with a database table. You may want to ignore this file in your VCS system (e.g. using Git's .gitignore file).

The .baleen_versions file will be created for you automatically if you use the default configuration values. You don't need to run baleen init in order for the file to be created.

If you don't want to type ./vendor/bin/baleen to run baleen commands then you can alternatively use Composer as a shortcut. Just edit your project's composer.json file to add the following:

   "scripts": {
       "baleen": "vendor/bin/baleen --ansi"

Now you can run Baleen CLI easily by just typing composer baleen!


To see some help and a list of available commands, simply execute:


For more help on a specific command simply run ./vendor/bin/baleen help {command}, replacing {command} with the name of an available command.

Creating Migrations

Migrations are stored by default under the ./migrations directory, which will be automatically created every time your run a commend if it doesn't exist.

You can customise which directory to use for migrations, as well as the namespace for migration classes by editing the .baleen.yml config file.

To easily create a new Migration file run the following command:

./vendor/bin/baleen migrations:create

Running Migrations

Running migrations is as easy as executing:

./vendor/bin/baleen migrate

By default it will migrate up to the latest available version.

If you'd like to see a log instead of the progress-bar then just add the --no-progress option to the migrate command above.


Documentation can be found either in the ./docs folder or compiled and online at Read The Docs:


Licensed under MIT - for more details please refer to the LICENSE file at the root directory.