Code Duplication    Length = 13-15 lines in 2 locations

htdocs/app/Migrations/Version20170830005500.php 1 location

@@ 11-23 (lines=13) @@
8
/**
9
 * Migration to add column is_translated to the languages table and set all translated languages to 1.
10
 */
11
class Version20170830005500 extends AbstractMigration
12
{
13
    public function up(Schema $schema): void
14
    {
15
        $this->addSql('ALTER TABLE `languages` ADD `is_translated` TINYINT DEFAULT 0 NOT NULL;');
16
        $this->addSql('UPDATE `languages` SET `is_translated` = 1 WHERE short IN (\'DE\', \'EN\', \'FR\', \'IT\', \'ES\');');
17
    }
18
    
19
    public function down(Schema $schema): void
20
    {
21
        $this->addSql('ALTER TABLE `languages` DROP `is_translated`');
22
    }
23
}
24

htdocs/app/Migrations/Version201912003190000.php 1 location

@@ 8-22 (lines=15) @@
5
use Doctrine\DBAL\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8
class Version201912003190000 extends AbstractMigration
9
{
10
    public function up(Schema $schema): void
11
    {
12
        $this->addSql('ALTER TABLE user	ADD gdpr_deletion TINYINT(1) DEFAULT 0 NOT NULL;');
13
        $this->addSql('ALTER TABLE caches ADD gdpr_deletion TINYINT(1) DEFAULT 0 NOT NULL;');
14
        $this->addSql('ALTER TABLE cache_logs ADD gdpr_deletion TINYINT(1) DEFAULT 0 NOT NULL;');
15
16
        $this->addSql('UPDATE user SET gdpr_deletion = 1 WHERE username like \'delete_%\'');
17
    }
18
19
    public function down(Schema $schema): void
20
    {
21
    }
22
}
23