Passed
Pull Request — master (#1747)
by Tarmo
10:16
created

Version20220324162224::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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