<commit_before><?php

namespace LaravelDoctrine\Migrations\Console;

use Illuminate\Console\Command;
use LaravelDoctrine\Migrations\Configuration\ConfigurationProvider;
use LaravelDoctrine\Migrations\Output\MigrationFileGenerator;

class GenerateCommand extends Command
{
    /**
     * The name and signature of the console command.
     * @var string
     */
    protected $signature = 'doctrine:migrations:generate
    {--create= : The table to be created.}
    {--table= : The table to migrate.}';

    /**
     * @var string
     */
    protected $description = 'Generate a blank migration class.';

    /**
     * Execute the console command.
     *
     * @param ConfigurationProvider  $provider
     * @param MigrationFileGenerator $generator
     */
    public function fire(ConfigurationProvider $provider, MigrationFileGenerator $generator)
    {
        $configuration = $provider->getForConnection();

        $filename = $generator->generate(
            $configuration,
            $this->option('create'),
            $this->option('table')
        );

        $this->line(sprintf('<info>Created Migration:</info> %s', $filename));
    }
}<commit_msg>Adds support for generating migrations per connection (#47)<commit_after><?php

namespace LaravelDoctrine\Migrations\Console;

use Illuminate\Console\Command;
use LaravelDoctrine\Migrations\Configuration\ConfigurationProvider;
use LaravelDoctrine\Migrations\Output\MigrationFileGenerator;

class GenerateCommand extends Command
{
    /**
     * The name and signature of the console command.
     * @var string
     */
    protected $signature = 'doctrine:migrations:generate
    {--connection= : The entity manager connection to generate the migration for.}
    {--create= : The table to be created.}
    {--table= : The table to migrate.}';

    /**
     * @var string
     */
    protected $description = 'Generate a blank migration class.';

    /**
     * Execute the console command.
     *
     * @param ConfigurationProvider  $provider
     * @param MigrationFileGenerator $generator
     */
    public function fire(ConfigurationProvider $provider, MigrationFileGenerator $generator)
    {
        $configuration = $provider->getForConnection($this->option('connection'));

        $filename = $generator->generate(
            $configuration,
            $this->option('create'),
            $this->option('table')
        );

        $this->line(sprintf('<info>Created Migration:</info> %s', $filename));
    }
}
{'fraction_non_alphanumeric': 0.11686746987951807, 'fraction_numerical': 0.0008032128514056225, 'mean_word_length': 3.063621533442088, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3494635', 'n_tokens_mistral': 646, 'n_tokens_neox': 638, 'n_words': 163}