Passed
Push — master ( 5299ad...064cf0 )
by Yannick
16:41 queued 06:10
created

Version20250331233100   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 4 1
A getDescription() 0 3 1
A up() 0 4 1
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
declare(strict_types=1);
6
7
/* For licensing terms, see /license.txt */
8
9
namespace Chamilo\CoreBundle\Migrations\Schema\V200;
10
11
use Chamilo\CoreBundle\Migrations\AbstractMigrationChamilo;
12
use Doctrine\DBAL\Schema\Schema;
13
14
final class Version20250331233100 extends AbstractMigrationChamilo
15
{
16
    public function getDescription(): string
17
    {
18
        return 'Move adaptive destination from c_quiz_answer to c_quiz_rel_question.';
19
    }
20
21
    public function up(Schema $schema): void
22
    {
23
        $this->addSql("ALTER TABLE c_quiz_rel_question ADD COLUMN destination TEXT DEFAULT NULL;");
24
        $this->addSql("ALTER TABLE c_quiz_answer DROP COLUMN destination;");
25
    }
26
27
    public function down(Schema $schema): void
28
    {
29
        $this->addSql("ALTER TABLE c_quiz_rel_question DROP COLUMN destination;");
30
        $this->addSql("ALTER TABLE c_quiz_answer ADD COLUMN destination TEXT DEFAULT NULL;");
31
    }
32
}
33