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

Version20200409130946   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 31
rs 10
c 1
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getDescription() 0 3 1
A sqLiteUp() 0 3 1
A mySQLUp() 0 6 1
A mySQLDown() 0 6 1
A sqLiteDown() 0 3 1
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