Failed Conditions
Push — master ( a0775a...0669e5 )
by Adrien
09:15
created

Version20200409022955   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A up() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Migration;
6
7
use Doctrine\DBAL\Schema\Schema;
8
9
class Version20200409022955 extends AbstractMigration
10
{
11
    public function up(Schema $schema): void
12
    {
13
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
14
15
        $this->addSql('ALTER TABLE account ADD total_balance INT DEFAULT 0 NOT NULL COMMENT \'(DC2Type:Money)\', ADD CHECK (type != \'group\' OR balance = 0)');
16
    }
17
}
18