Failed Conditions
Push — master ( 4252f4...9d8e13 )
by Adrien
07:13
created

Version20190128033524   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
ccs 0
cts 5
cp 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A up() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Migration;
6
7
use Doctrine\DBAL\Schema\Schema;
8
9
class Version20190128033524 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('CREATE UNIQUE INDEX UNIQ_8D93D649E7927C74 ON user (email)');
16
        $this->addSql('ALTER TABLE user CHANGE email email VARCHAR(191) DEFAULT NULL;');
17
    }
18
}
19