Version20220324162224   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 4 1
A getDescription() 0 4 1
A down() 0 4 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace DoctrineMigrations;
5
6
use Doctrine\DBAL\Schema\Schema;
7
use Doctrine\Migrations\AbstractMigration;
8
use Override;
9
10
/**
11
 * Auto-generated Migration: Please modify to your needs!
12
 */
13
final class Version20220324162224 extends AbstractMigration
14
{
15
    /**
16
     * @noinspection PhpMissingParentCallCommonInspection
17
     */
18
    #[Override]
19
    public function getDescription(): string
20
    {
21
        return 'Added username column to log_login table, so that after user deletion there is reference to the user.';
22
    }
23
24
    #[Override]
25
    public function up(Schema $schema): void
26
    {
27
        $this->addSql('ALTER TABLE log_login ADD username VARCHAR(255) NOT NULL AFTER type');
28
    }
29
30
    /**
31
     * @noinspection PhpMissingParentCallCommonInspection
32
     */
33
    #[Override]
34
    public function down(Schema $schema): void
35
    {
36
        $this->addSql('ALTER TABLE log_login DROP username');
37
    }
38
}
39