src/Silex/Doctrine/DBAL/Tools/Console/Command/CreateSchemaCommand.php
protected function execute( InputInterface $input, OutputInterface $output )
    {
        parent::execute($input, $output);

        if ($this->getContainer()->offsetExists('dbs')) {
            $this->setConnection(
                $this->getContainer()['dbs'][$input->getOption('connection')]
            );
        }

        $schema = new ConfigurableSchema();
        $config = $this->getContainer()['config']['dbal_schema']
            [$input->getOption('connection')];

        if (isset($config['tables'])) {
            $schema->createTablesFromConfig($config['tables']);
        }

        $schema->bundleMultipleSchemas($config);

        $sql = $schema->toSql($this->getConnection()->getDatabasePlatform());

        foreach ((array) $sql as $query) {
            $output->write(sprintf('Executing <info>%s</info>', $query));
            $this->getConnection()->executeUpdate($query);
            $output->write(' OK' . "\n");
        }
    }
protected function execute( InputInterface $input, OutputInterface $output )
    {
        parent::execute($input, $output);

        if ($this->getContainer()->offsetExists('dbs')) {
            $this->setConnection(
                $this->getContainer()['dbs'][$input->getOption('connection')]
            );
        }

        $schema = new ConfigurableSchema();
        $config = $this->getContainer()['config']['dbal_schema']
            [$input->getOption('connection')];

        if (isset($config['tables'])) {
            $schema->createTablesFromConfig($config['tables']);
        }

        $schema->bundleMultipleSchemas($config);

        $sql = $schema->toSql($this->getConnection()->getDatabasePlatform());

        foreach ((array) $sql as $query) {
            $output->write(sprintf('Executing <info>%s</info>', $query));
            $this->getConnection()->executeUpdate($query);
            $output->write(' OK' . "\n");
        }
    }
Executes command

@param InputInterface  $input  Command input
@param OutputInterface $output Console output

@throws \Exception

@return void