ruckus/ruckusing-migrations — pull request #57 by salimane (2012-12-29 08:34:48+00:00)
Title: add help to tasks to show some descriptions about each task

```shell
php main.php help

Usage: php main.php [help] [task parameters] [ENV=environment]

help: Display this message

ENV: The ENV command line parameter can be used to specify a different
database to run against, as specific in the configuration file
(config/database.inc.php).
By default, ENV is "development"

task: In a nutshell, task names are pseudo-namespaced. The tasks that come
with the framework are namespaced to "db" (e.g. the tasks are "db:migrate",
"db:setup", etc).
All tasks available actually :

- db:setup : A basic task to initialize your DB for migrations is
available. One should always run this task when first starting out.

- db:generate : A generic task which acts as a Generator for migrations.

- db:migrate : The primary purpose of the framework is to run migrations,
and the execution of migrations is all handled by just a regular ol' task.

- db:version : It is always possible to ask the framework (really the DB)
what version it is currently at.

- db:status : With this taks you'll get an overview of the already
executed migrations and which will be executed when running db:migrate

- db:schema : It can be beneficial to get a dump of the DB in raw SQL
format which represents the current version.

```
```shell
php main.php db:generate help

Task: db:generate

Generator for migrations.

is a descriptive name of the migration,
joined with underscores. e.g.: add_index_to_users | create_users_table

Example :

php main.php db:generate add_index_to_users

```
```shell
php main.php db:migrate help

Task: db:migrate [VERSION]

The primary purpose of the framework is to run migrations, and the
execution of migrations is all handled by just a regular ol' task.

VERSION can be specified to go up (or down) to a specific
version, based on the current version. If not specified,
all migrations greater than the current database version
will be executed.

Example A: The database is fresh and empty, assuming there
are 5 actual migrations, but only the first two should be run.

php main.php db:migrate VERSION=20101006114707

Example B: The current version of the DB is 20101006114707
and we want to go down to 20100921114643

php main.php db:migrate VERSION=20100921114643

Example C: You can also use relative number of revisions
(positive migrate up, negative migrate down).

php main.php db:migrate VERSION=-2

```