Code Duplication    Length = 21-22 lines in 2 locations

src/Migrations/Version20150917142245.php 1 location

@@ 8-29 (lines=22) @@
5
use Doctrine\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8
class Version20150917142245 extends AbstractMigration
9
{
10
    public function getDescription() : string
11
    {
12
        return '';
13
    }
14
15
    public function up(Schema $schema) : void
16
    {
17
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
18
19
        $this->addSql('ALTER TABLE performance_schedule ADD venue VARCHAR(255) NOT NULL');
20
        $this->addSql("UPDATE performance_schedule SET venue='venue-theatre' WHERE datetime < date('2015-07-01')");
21
    }
22
23
    public function down(Schema $schema) : void
24
    {
25
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
26
27
        $this->addSql('ALTER TABLE performance_schedule DROP venue');
28
    }
29
}
30

src/Migrations/Version20160503093009.php 1 location

@@ 8-28 (lines=21) @@
5
use Doctrine\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8
class Version20160503093009 extends AbstractMigration
9
{
10
    public function getDescription() : string
11
    {
12
        return '';
13
    }
14
15
    public function up(Schema $schema) : void
16
    {
17
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
18
19
        $this->addSql('ALTER TABLE posts ADD pinned TINYINT(1) NOT NULL');
20
    }
21
22
    public function down(Schema $schema) : void
23
    {
24
        $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
25
26
        $this->addSql('ALTER TABLE posts DROP pinned');
27
    }
28
}
29