Completed
Push — master ( dd523e...5829fd )
by Beñat
21s
created

Version20170731164211::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Kreta package.
5
 *
6
 * (c) Beñat Espiña <[email protected]>
7
 * (c) Gorka Laucirica <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
declare(strict_types=1);
14
15
namespace Kreta\IdentityAccess\Infrastructure\Persistence\Doctrine\Migrations;
16
17
use Doctrine\DBAL\Migrations\AbstractMigration;
18
use Doctrine\DBAL\Schema\Schema;
19
20
class Version20170731164211 extends AbstractMigration
21
{
22
    public function up(Schema $schema) : void
23
    {
24
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 143 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
25
26
        $this->addSql('ALTER TABLE user CHANGE username username VARCHAR(150) NOT NULL');
27
    }
28
29
    public function down(Schema $schema) : void
30
    {
31
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
0 ignored issues
show
Coding Style introduced by
This line exceeds maximum limit of 120 characters; contains 143 characters

Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.

Loading history...
32
33
        $this->addSql('ALTER TABLE user CHANGE username username VARCHAR(20) NOT NULL COLLATE utf8_unicode_ci');
34
    }
35
}
36