示例#1
0
    /**
     * Configures command
     *
     * @return void
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('dbal:schema:create')->addOption('fakedata', null, InputOption::VALUE_NONE, 'Set this parameter to add fake data')->setDescription('Creates the configured database schema')->setHelp(<<<EOT
The <info>dbal:schema:create</info> command creates the default
connections database:

<info>php app/console dbal:schema:create</info>

You can also optionally specify the name of a connection to create the
schema for:

<info>php app/console dbal:schema:create --connection=default</info>
EOT
);
    }
    /**
     * Configures command
     *
     * @return void
     */
    protected function configure()
    {
        parent::configure();
        $this->setName('dbal:database:create')->setDescription('Creates the configured database')->setHelp(<<<EOT
The <info>dbal:database:create</info> command creates the default
connections database:

<info>php app/console dbal:database:create</info>

You can also optionally specify the name of a connection to create the
database for:

<info>php app/console dbal:database:create --connection=default</info>
EOT
);
    }
示例#3
0
    /**
     * Configures command
     *
     * @return void
     */
    protected function configure()
    {
        // Config base command
        parent::configure();
        // Set params command
        $this->setName('dbal:database:drop')->addOption('force', null, InputOption::VALUE_NONE, 'Set this parameter to execute this action')->setDescription('Drops the configured database')->setHelp(<<<EOT
The <info>dbal:database:drop</info> command drops the default connections
database:

<info>php app/console dbal:database:drop</info>

The --force parameter has to be used to actually drop the database.

You can also optionally specify the name of a connection to drop the database
for:

<info>php app/console dbal:database:drop --connection=default</info>

<error>Be careful: All data in a given database will be lost when executing
this command.</error>
EOT
);
    }