Version20220324162224::getDescription()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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