m180408_121732_class_not_null::safeUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/flux/license
6
 * @link       https://www.flipboxfactory.com/software/flux/
7
 */
8
9
namespace flipbox\flux\migrations;
10
11
use craft\db\Migration;
12
use flipbox\flux\records\Transformer;
13
14
class m180408_121732_class_not_null extends Migration
15
{
16
    /**
17
     * @inheritdoc
18
     */
19
    public function safeUp()
20
    {
21
        $this->alterColumn(
22
            Transformer::tableName(),
23
            'class',
24
            $this->string()
25
        );
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31
    public function safeDown()
32
    {
33
        echo "m180408_121732_class_not_null cannot be reverted.\n";
34
        return false;
35
    }
36
}
37