Passed
Push — develop ( 229fa6...7d2e81 )
by Laurent
08:00 queued 04:20
created

Version20201216205143   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 4 1
A getDescription() 0 3 1
A up() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the G.L.S.R. Apps package.
7
 *
8
 * (c) Dev-Int Création <[email protected]>.
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Infrastructure\DoctrineMigrations;
15
16
use Doctrine\DBAL\Schema\Schema;
17
use Doctrine\Migrations\AbstractMigration;
18
19
/**
20
 * Auto-generated Migration: Please modify to your needs!
21
 */
22
final class Version20201216205143 extends AbstractMigration
23
{
24
    public function getDescription(): string
25
    {
26
        return 'Update Company table.';
27
    }
28
29
    public function up(Schema $schema): void
30
    {
31
        // this up() migration is auto-generated, please modify it to your needs
32
        $this->addSql(
33
            'ALTER TABLE company ' .
34
            'ADD zip_code VARCHAR(255) NOT NULL, ' .
35
            'ADD town VARCHAR(255) NOT NULL, ' .
36
            'ADD country VARCHAR(255) NOT NULL'
37
        );
38
    }
39
40
    public function down(Schema $schema): void
41
    {
42
        // this down() migration is auto-generated, please modify it to your needs
43
        $this->addSql('ALTER TABLE company DROP zip_code, DROP town, DROP country');
44
    }
45
}
46