<commit_before><?php

declare(strict_types=1);

namespace App\Entity\Migration;

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

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20200129010322 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Deduplicate streamers and hash passwords for streamer accounts.';
    }

    public function preup(Schema $schema): void
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql',
            'Migration can only be executed safely on \'mysql\'.');

        // Deleting duplicate streamers to avoid constraint errors in subsequent update
        $streamers = $this->connection->fetchAll('SELECT * FROM station_streamers ORDER BY station_id, id ASC');
        $accounts = [];

        foreach ($streamers as $row) {
            $station_id = $row['station_id'];
            $username = $row['streamer_username'];<commit_msg>Minor typo in migration function name.<commit_after><?php

declare(strict_types=1);

namespace App\Entity\Migration;

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

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20200129010322 extends AbstractMigration
{
    public function getDescription(): string
    {
        return 'Deduplicate streamers and hash passwords for streamer accounts.';
    }

    public function preUp(Schema $schema): void
    {
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql',
            'Migration can only be executed safely on \'mysql\'.');

        // Deleting duplicate streamers to avoid constraint errors in subsequent update
        $streamers = $this->connection->fetchAll('SELECT * FROM station_streamers ORDER BY station_id, id ASC');
        $accounts = [];

        foreach ($streamers as $row) {
            $station_id = $row['station_id'];
            $username = $row['streamer_username'];
{'fraction_non_alphanumeric': 0.11295843520782396, 'fraction_numerical': 0.014669926650366748, 'mean_word_length': 3.457516339869281, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '7478913', 'n_tokens_mistral': 562, 'n_tokens_neox': 539, 'n_words': 156}