Completed
Push — 1.10.x ( 2635b5...f0080b )
by Yannick
165:55 queued 120:08
created

Version20150527101600   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 42
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Application\Migrations\Schema\V110;
5
6
use Application\Migrations\AbstractMigrationChamilo;
7
use Doctrine\DBAL\Schema\Schema;
8
9
/**
10
 * Class Version20150527120703
11
 * LP autolunch -> autolaunch
12
 * @package Application\Migrations\Schema\V11010
13
 */
14
class Version20150527101600 extends AbstractMigrationChamilo
15
{
16
    /**
17
     * @param Schema $schema
18
     */
19
    public function up(Schema $schema)
20
    {
21
        $this->addSettingCurrent(
22
            'gamification_mode',
23
            '',
24
            'radio',
25
            'Platform',
26
            0,
27
            'GamificationModeTitle',
28
            'GamificationModeComment',
29
            null,
30
            '',
31
            1,
32
            true,
33
            false,
34
            [
35
                [
36
                    'value' => 1,
37
                    'text' => 'Yes'
38
                ],
39
                [
40
                    'value' => 0,
41
                    'text' => 'No'
42
                ]
43
            ]
44
        );
45
    }
46
47
    /**
48
     * @param Schema $schema
49
     */
50
    public function down(Schema $schema)
51
    {
52
        $this->addSql("DELETE FROM settings_options WHERE variable = 'gamification_mode'");
53
        $this->addSql("DELETE FROM settings_current WHERE variable = 'gamification_mode'");
54
    }
55
}
56