<commit_before><?php

namespace {{ namespace }}\Migrations\Schema;

use Doctrine\DBAL\Schema\Schema;
use Oro\Bundle\MigrationBundle\Migration\Installation;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

/**
 * @SuppressWarnings(PHPMD.TooManyMethods)
 */
class {{ className }} implements Installation
{
    /**
     * {@inheritdoc}
     */
    public function getMigrationVersion()
    {
        return '{{ version }}';
    }

    /**
     * {@inheritdoc}
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        /** Tables generation **/
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
        $this->{{ 'create' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'Table' }}($schema);
{% endfor %}

        /** Foreign keys generation **/
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
{% if table.ForeignKeys is not empty %}<commit_msg>CRM-1610: Create migrations for incompatible initial migrations - supress PHPMD<commit_after><?php

namespace {{ namespace }}\Migrations\Schema;

use Doctrine\DBAL\Schema\Schema;
use Oro\Bundle\MigrationBundle\Migration\Installation;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

/**
 * @SuppressWarnings(PHPMD.TooManyMethods)
 * @SuppressWarnings(PHPMD.ExcessiveClassLength)
 */
class {{ className }} implements Installation
{
    /**
     * {@inheritdoc}
     */
    public function getMigrationVersion()
    {
        return '{{ version }}';
    }

    /**
     * {@inheritdoc}
     */
    public function up(Schema $schema, QueryBag $queries)
    {
        /** Tables generation **/
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
        $this->{{ 'create' ~ table.name|replace({'_': ' '})|title|replace({' ': ''}) ~ 'Table' }}($schema);
{% endfor %}

        /** Foreign keys generation **/
{% for table in schema.tables if allowedTables is empty or allowedTables[table.name] is defined %}
{% if table.ForeignKeys is not empty %}
{'fraction_non_alphanumeric': 0.15079748670855486, 'fraction_numerical': 0.0019333011116481392, 'mean_word_length': 3.519650655021834, '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': '7378005', 'n_tokens_mistral': 613, 'n_tokens_neox': 604, 'n_words': 147}