Passed
Pull Request — master (#6184)
by Yannick
11:18 queued 32s
created

Version20250331233100::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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