diff --git a/Command/GenerateDiffCommand.php b/Command/MigrationGenerateDiffCommand.php similarity index 73% rename from Command/GenerateDiffCommand.php rename to Command/MigrationGenerateDiffCommand.php index d2a9693..a35b6a5 100644 --- a/Command/GenerateDiffCommand.php +++ b/Command/MigrationGenerateDiffCommand.php @@ -16,11 +16,11 @@ use Symfony\Component\Console\Output\OutputInterface; */ /** - * GenerateDiffCommand. + * MigrationGenerateDiffCommand. * * @author William DURAND */ -class GenerateDiffCommand extends PhingCommand +class MigrationGenerateDiffCommand extends PhingCommand { /** * @see Command @@ -30,12 +30,12 @@ class GenerateDiffCommand extends PhingCommand $this ->setDescription('Generates SQL diff between the XML schemas and the current database structure') ->setHelp(<<propel:generate-diff command compares the current database structure and the available schemas. If there is a difference, it creates a migration file. +The propel:migration:generate-diff command compares the current database structure and the available schemas. If there is a difference, it creates a migration file. - php app/console propel:generate-diff + php app/console propel:migration:generate-diff EOT ) - ->setName('propel:generate-diff') + ->setName('propel:migration:generate-diff') ; } diff --git a/Command/MigrateCommand.php b/Command/MigrationMigrateCommand.php similarity index 57% rename from Command/MigrateCommand.php rename to Command/MigrationMigrateCommand.php index ccd8bfb..00344bb 100644 --- a/Command/MigrateCommand.php +++ b/Command/MigrationMigrateCommand.php @@ -18,11 +18,11 @@ use Symfony\Component\Console\Output\Output; */ /** - * MigrateCommand. + * MigrationMigrateCommand. * * @author William DURAND */ -class MigrateCommand extends PhingCommand +class MigrationMigrateCommand extends PhingCommand { /** * @see Command @@ -36,20 +36,21 @@ class MigrateCommand extends PhingCommand new InputOption('--down', '', InputOption::VALUE_NONE, 'Executes the next migration down'), )) ->setHelp(<<propel:migrate command checks the version of the database structure, looks for migrations files not yet executed (i.e. with a greater version timestamp), and executes them. +The propel:migration:migrate command checks the version of the database structure, looks for migrations files not yet executed (i.e. with a greater version timestamp), and executes them. - php app/console propel:migrate [--up] [--down] + php app/console propel:migration:migrate [--up] [--down] - php app/console propel:migrate : is the default command, it executes all migrations files. + php app/console propel:migration:migrate : is the default command, it executes all migrations files. - php app/console propel:migrate --up : checks the version of the database structure, looks for migrations files not yet executed - (i.e. with a greater version timestamp), and executes the first one of them. + php app/console propel:migration:migrate --up : checks the version of the database structure, looks for migrations files not yet executed + (i.e. with a greater version timestamp), and executes the first one of them. + + php app/console propel:migration:migrate --down : checks the version of the database structure, and looks for migration files already executed + (i.e. with a lower version timestamp). The last executed migration found is reversed. - php app/console propel:migrate --down : checks the version of the database structure, and looks for migration files already executed - (i.e. with a lower version timestamp). The last executed migration found is reversed. EOT ) - ->setName('propel:migrate') + ->setName('propel:migration:migrate') ; }