From 2da085cff927eef126156aa661694b991ae2aba7 Mon Sep 17 00:00:00 2001 From: William DURAND Date: Wed, 2 Feb 2011 02:31:12 +0100 Subject: [PATCH] Renamed migrations command classes Migrations commands are now : > php app/console propel:migration:generate-diff > php app/console propel:migration:migrate --- ...d.php => MigrationGenerateDiffCommand.php} | 10 ++++----- ...ommand.php => MigrationMigrateCommand.php} | 21 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) rename Command/{GenerateDiffCommand.php => MigrationGenerateDiffCommand.php} (73%) rename Command/{MigrateCommand.php => MigrationMigrateCommand.php} (57%) 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') ; }