<commit_before><?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration,
    Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your need!
 */
class Version20130119115755 extends AbstractMigration
{
    public function up(Schema $schema)
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");
        
        $this->addSql("DROP INDEX unique_setting_key_user ON settings");
        $this->addSql("ALTER TABLE settings CHANGE `key` name VARCHAR(255) NOT NULL");
        $this->addSql("CREATE UNIQUE INDEX unique_setting_name_namespace_user ON settings (`name`, namespace, user_id)");
    }

    public function down(Schema $schema)
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");
        
        $this->addSql("DROP INDEX unique_setting_name_namespace_user ON settings");
        $this->addSql("ALTER TABLE settings CHANGE name `key` VARCHAR(255) NOT NULL");
        $this->addSql("CREATE UNIQUE INDEX unique_setting_key_user ON settings (key, namespace, user_id)");
    }
}
<commit_msg>fix migration - index is not available<commit_after><?php

namespace Application\Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration,
    Doctrine\DBAL\Schema\Schema;

/**
 * Auto-generated Migration: Please modify to your need!
 */
class Version20130119115755 extends AbstractMigration
{
    public function up(Schema $schema)
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");

//        $this->addSql("DROP INDEX unique_setting_key_user ON settings");
        $this->addSql("ALTER TABLE settings CHANGE `key` name VARCHAR(255) NOT NULL");
        $this->addSql("CREATE UNIQUE INDEX unique_setting_name_namespace_user ON settings (`name`, namespace, user_id)");
    }

    public function down(Schema $schema)
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'.");

        $this->addSql("DROP INDEX unique_setting_name_namespace_user ON settings");
        $this->addSql("ALTER TABLE settings CHANGE name `key` VARCHAR(255) NOT NULL");
        $this->addSql("CREATE UNIQUE INDEX unique_setting_key_user ON settings (key, namespace, user_id)");
    }
}

{'fraction_non_alphanumeric': 0.12025540971975877, 'fraction_numerical': 0.014189428875487761, 'mean_word_length': 3.912891986062718, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, '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': '5443739', 'n_tokens_mistral': 810, 'n_tokens_neox': 786, 'n_words': 231}