<commit_before><?php

namespace EM\FoundationBundle\Command;

use Composer\Script\CommandEvent;
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler;

/**
 * @since 3.5
 */
class DatabaseProvisionCommand extends ScriptHandler
{
    static public function initDatabases(CommandEvent $event)
    {
        if (null !== $consoleDir = static::getConsoleDir($event, 'install assets')) {
            static::executeCommand($event, $consoleDir, 'doctrine:database:create --env=prod --if-not-exists');
            static::executeCommand($event, $consoleDir, 'doctrine:migrations:migrate --env=prod --no-interaction');

            if ($event->isDevMode()) {
                static::executeCommand($event, $consoleDir, 'doctrine:database:create --env=test --if-not-exists');
                static::executeCommand($event, $consoleDir, 'doctrine:migrations:migrate --env=test --no-interaction');
            }
        }<commit_msg>do not execute migrations on test db on provisioning<commit_after><?php

namespace EM\FoundationBundle\Command;

use Composer\Script\CommandEvent;
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler;

/**
 * @since 3.5
 */
class DatabaseProvisionCommand extends ScriptHandler
{
    static public function initDatabases(CommandEvent $event)
    {
        if (null !== $consoleDir = static::getConsoleDir($event, 'install assets')) {
            static::executeCommand($event, $consoleDir, 'doctrine:database:create --env=prod --if-not-exists');
            static::executeCommand($event, $consoleDir, 'doctrine:migrations:migrate --env=prod --no-interaction');

            if ($event->isDevMode()) {
                static::executeCommand($event, $consoleDir, 'doctrine:database:create --env=test --if-not-exists');
            }
        }
{'fraction_non_alphanumeric': 0.13915492957746478, 'fraction_numerical': 0.0022535211267605635, 'mean_word_length': 3.637075718015666, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1561085', 'n_tokens_mistral': 493, 'n_tokens_neox': 491, 'n_words': 95}