<commit_before><commit_msg>Inject fake country 'Channel Islands' to have population data #2290<commit_after><?php

namespace DoctrineMigrations;

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

/**
 * Auto-generated Migration: Please modify to your needs!
 */
class Version20131022164739 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() != "postgresql", "Migration can only be executed safely on 'postgresql'.");

        // Import real data from geoname for 'Channel Islands'
        $this->addSql("INSERT INTO geoname (id, name, asciiname, alternatenames, latitude, longitude, fclass, fcode, country, cc2, admin1, admin2, admin3, admin4, population, elevation, gtopo30, timezone, moddate, geometry) VALUES (3042400, 'Channel Islands', 'Channel Islands', 'Channel Islands,channel', 49.3466000000000022, -2.36206000000000005, 'T', 'ISLS', 'GG', 'GB', '00', NULL, NULL, NULL, 158000, NULL, -9999, 'Europe/Guernsey', '2010-03-02', '0101000020E6100000A18499B67FE502C0956588635DAC4840');");

        // Import made-up data to create a fake country 'Channel Islands', as seen in JMP country files and population sources
        $this->addSql("INSERT INTO country (geoname_id, code, iso3, iso_numeric, name, area) VALUES (3042400, 'ZZ', 'CIS', 830, 'Channel Islands', NULL);");
    }

    public function down(Schema $schema)
    {
        $this->throwIrreversibleMigrationException();
    }

}
{'fraction_non_alphanumeric': 0.12476606363069245, 'fraction_numerical': 0.08733624454148471, 'mean_word_length': 4.608391608391608, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '4879831', 'n_tokens_mistral': 575, 'n_tokens_neox': 477, 'n_words': 147}