diff --git a/Command/Proxy/RunSqlDoctrineCommand.php b/Command/Proxy/RunSqlDoctrineCommand.php index edcc7828f..ff6c3b078 100644 --- a/Command/Proxy/RunSqlDoctrineCommand.php +++ b/Command/Proxy/RunSqlDoctrineCommand.php @@ -21,7 +21,6 @@ protected function configure() $this ->setName('doctrine:query:sql') - ->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command') ->setHelp(<<%command.name% command executes the given SQL query and outputs the results: @@ -29,6 +28,12 @@ protected function configure() php %command.full_name% "SELECT * FROM users" EOT ); + + if ($this->getDefinition()->hasOption('connection')) { + return; + } + + $this->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command'); } /** diff --git a/Resources/doc/configuration.rst b/Resources/doc/configuration.rst index d02490559..c5e986b57 100644 --- a/Resources/doc/configuration.rst +++ b/Resources/doc/configuration.rst @@ -95,8 +95,9 @@ Configuration Reference platform_service: ~ auto_commit: ~ - # If set to "/^sf2_/" all tables not prefixed with "sf2_" will be ignored by the schema - # tool. This is for custom tables which should not be altered automatically. + # If set to "/^sf2_/" all tables, and any named objects such as sequences + # not prefixed with "sf2_" will be ignored by the schema tool. + # This is for custom tables which should not be altered automatically. schema_filter: ~ # When true, queries are logged to a "doctrine" monolog channel