Completed
Pull Request — develop (#187)
by Serhii
02:04
created

Version20210425203035::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DoctrineMigrations;
6
7
use App\Enum\EmployeeStaffEnum;
8
use Doctrine\DBAL\Schema\Schema;
9
use Doctrine\Migrations\AbstractMigration;
10
11
final class Version20210425203035 extends AbstractMigration
12
{
13
    public function getDescription() : string
14
    {
15
        return 'Added Epoch enum to staff column at employees';
16
    }
17
18
    public function up(Schema $schema) : void
19
    {
20
        $this->addSql('ALTER TABLE employees MODIFY COLUMN staff ENUM("'.implode('","', EmployeeStaffEnum::$choices).'");');
21
    }
22
23
    public function down(Schema $schema) : void
24
    {
25
    }
26
}
27