Completed
Push — master ( 4ea9b4...70e6b0 )
by Serhii
04:57
created

Version20160503093009::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 6
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace DoctrineMigrations;
4
5
use Doctrine\Migrations\AbstractMigration;
6
use Doctrine\DBAL\Schema\Schema;
7
8 View Code Duplication
class Version20160503093009 extends AbstractMigration
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
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