Passed
Push — master ( bd1da1...a65303 )
by Jan
04:33
created

Version20200409130946::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 6
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DoctrineMigrations;
6
7
use App\Migrations\AbstractMultiPlatformMigration;
8
use Doctrine\DBAL\Schema\Schema;
9
use Doctrine\Migrations\AbstractMigration;
10
11
/**
12
 * Auto-generated Migration: Please modify to your needs!
13
 */
14
final class Version20200409130946 extends AbstractMultiPlatformMigration
15
{
16
    public function getDescription(): string
17
    {
18
        return '';
19
    }
20
21
    public function mySQLUp(Schema $schema): void
22
    {
23
        // this up() migration is auto-generated, please modify it to your needs
24
        $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
25
26
        $this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(128) NOT NULL');
27
    }
28
29
    public function mySQLDown(Schema $schema): void
30
    {
31
        // this down() migration is auto-generated, please modify it to your needs
32
        $this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
33
34
        $this->addSql('ALTER TABLE u2f_keys CHANGE key_handle key_handle VARCHAR(64) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`');
35
    }
36
37
    public function sqLiteUp(Schema $schema): void
38
    {
39
        $this->skipIf(true, "Migration not needed for SQLite. Skipping...");
40
    }
41
42
    public function sqLiteDown(Schema $schema): void
43
    {
44
        $this->skipIf(true, "Migration not needed for SQLite. Skipping...");
45
    }
46
}
47