protected function configure()
    {
        parent::configure();

        $this
            ->setName(self::COMMAND_NAME)
            ->setAliases(array('kaliop:migration:update'))
            ->setDescription('Execute available migration definitions.')
            // nb: when adding options, remember to forward them to sub-commands executed in 'separate-process' mode
            ->addOption('admin-login', 'a', InputOption::VALUE_REQUIRED, "Login of admin account used whenever elevated privileges are needed (user id 14 used by default)")
            ->addOption('clear-cache', 'c', InputOption::VALUE_NONE, "Clear the cache after the command finishes")
            ->addOption('default-language', 'l', InputOption::VALUE_REQUIRED, "Default language code that will be used if no language is provided in migration steps")
            ->addOption('force', 'f', InputOption::VALUE_NONE, "Force (re)execution of migrations already DONE, SKIPPED or FAILED. Use with great care!")
            ->addOption('ignore-failures', 'i', InputOption::VALUE_NONE, "Keep executing migrations even if one fails")
            ->addOption('no-interaction', 'n', InputOption::VALUE_NONE, "Do not ask any interactive question")
            ->addOption('no-transactions', 'u', InputOption::VALUE_NONE, "Do not use a repository transaction to wrap each migration. Unsafe, but needed for legacy slot handlers")
            ->addOption('path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, "The directory or file to load the migration definitions from")
            ->addOption('separate-process', 'p', InputOption::VALUE_NONE, "Use a separate php process to run each migration. Safe if your migration leak memory. A tad slower")
            ->addOption('force-sigchild-enabled', null, InputOption::VALUE_NONE, "When using a separate php process to run each migration, tell Symfony that php was compiled with --enable-sigchild option")
            ->addOption('survive-disconnected-tty', null, InputOption::VALUE_NONE, "Keep on executing migrations even if the tty where output is written to gets removed. Useful if you run the command over an unstable ssh connection")
            ->addOption('child', null, InputOption::VALUE_NONE, "*DO NOT USE* Internal option for when forking separate processes")
            ->setHelp(<<<EOT
The <info>kaliop:migration:migrate</info> command loads and executes migrations:

    <info>./ezpublish/console kaliop:migration:migrate</info>

You can optionally specify the path to migration definitions with <info>--path</info>:

    <info>./ezpublish/console kaliop:migrations:migrate --path=/path/to/bundle/version_directory --path=/path/to/bundle/version_directory/single_migration_file</info>
EOT
            );
    }
protected function configure()
    {
        parent::configure();

        $this
            ->setName(self::COMMAND_NAME)
            ->setAliases(array('kaliop:migration:update'))
            ->setDescription('Execute available migration definitions.')
            // nb: when adding options, remember to forward them to sub-commands executed in 'separate-process' mode
            ->addOption('admin-login', 'a', InputOption::VALUE_REQUIRED, "Login of admin account used whenever elevated privileges are needed (user id 14 used by default)")
            ->addOption('clear-cache', 'c', InputOption::VALUE_NONE, "Clear the cache after the command finishes")
            ->addOption('default-language', 'l', InputOption::VALUE_REQUIRED, "Default language code that will be used if no language is provided in migration steps")
            ->addOption('force', 'f', InputOption::VALUE_NONE, "Force (re)execution of migrations already DONE, SKIPPED or FAILED. Use with great care!")
            ->addOption('ignore-failures', 'i', InputOption::VALUE_NONE, "Keep executing migrations even if one fails")
            ->addOption('no-interaction', 'n', InputOption::VALUE_NONE, "Do not ask any interactive question")
            ->addOption('no-transactions', 'u', InputOption::VALUE_NONE, "Do not use a repository transaction to wrap each migration. Unsafe, but needed for legacy slot handlers")
            ->addOption('path', null, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, "The directory or file to load the migration definitions from")
            ->addOption('separate-process', 'p', InputOption::VALUE_NONE, "Use a separate php process to run each migration. Safe if your migration leak memory. A tad slower")
            ->addOption('force-sigchild-enabled', null, InputOption::VALUE_NONE, "When using a separate php process to run each migration, tell Symfony that php was compiled with --enable-sigchild option")
            ->addOption('survive-disconnected-tty', null, InputOption::VALUE_NONE, "Keep on executing migrations even if the tty where output is written to gets removed. Useful if you run the command over an unstable ssh connection")
            ->addOption('child', null, InputOption::VALUE_NONE, "*DO NOT USE* Internal option for when forking separate processes")
            ->setHelp(<<<EOT
The <info>kaliop:migration:migrate</info> command loads and executes migrations:

    <info>./ezpublish/console kaliop:migration:migrate</info>

You can optionally specify the path to migration definitions with <info>--path</info>:

    <info>./ezpublish/console kaliop:migrations:migrate --path=/path/to/bundle/version_directory --path=/path/to/bundle/version_directory/single_migration_file</info>
EOT
            );
    }
protected function configure ( ) { parent :: configure ( ) ; $ this -> setName ( self :: COMMAND_NAME ) -> setAliases ( array ( 'kaliop:migration:update' ) ) -> setDescription ( 'Execute available migration definitions.' ) // nb: when adding options, remember to forward them to sub-commands executed in 'separate-process' mode -> addOption ( 'admin-login' , 'a' , InputOption :: VALUE_REQUIRED , "Login of admin account used whenever elevated privileges are needed (user id 14 used by default)" ) -> addOption ( 'clear-cache' , 'c' , InputOption :: VALUE_NONE , "Clear the cache after the command finishes" ) -> addOption ( 'default-language' , 'l' , InputOption :: VALUE_REQUIRED , "Default language code that will be used if no language is provided in migration steps" ) -> addOption ( 'force' , 'f' , InputOption :: VALUE_NONE , "Force (re)execution of migrations already DONE, SKIPPED or FAILED. Use with great care!" ) -> addOption ( 'ignore-failures' , 'i' , InputOption :: VALUE_NONE , "Keep executing migrations even if one fails" ) -> addOption ( 'no-interaction' , 'n' , InputOption :: VALUE_NONE , "Do not ask any interactive question" ) -> addOption ( 'no-transactions' , 'u' , InputOption :: VALUE_NONE , "Do not use a repository transaction to wrap each migration. Unsafe, but needed for legacy slot handlers" ) -> addOption ( 'path' , null , InputOption :: VALUE_OPTIONAL | InputOption :: VALUE_IS_ARRAY , "The directory or file to load the migration definitions from" ) -> addOption ( 'separate-process' , 'p' , InputOption :: VALUE_NONE , "Use a separate php process to run each migration. Safe if your migration leak memory. A tad slower" ) -> addOption ( 'force-sigchild-enabled' , null , InputOption :: VALUE_NONE , "When using a separate php process to run each migration, tell Symfony that php was compiled with --enable-sigchild option" ) -> addOption ( 'survive-disconnected-tty' , null , InputOption :: VALUE_NONE , "Keep on executing migrations even if the tty where output is written to gets removed. Useful if you run the command over an unstable ssh connection" ) -> addOption ( 'child' , null , InputOption :: VALUE_NONE , "*DO NOT USE* Internal option for when forking separate processes" ) -> setHelp ( <<<EOT
The <info>kaliop:migration:migrate</info> command loads and executes migrations:

    <info>./ezpublish/console kaliop:migration:migrate</info>

You can optionally specify the path to migration definitions with <info>--path</info>:

    <info>./ezpublish/console kaliop:migrations:migrate --path=/path/to/bundle/version_directory --path=/path/to/bundle/version_directory/single_migration_file</info>
EOT ) ; }
Set up the command.

Define the name, options and help text.
Set up the command .