m180408_121732_class_not_null   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 23
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 8 1
A safeDown() 0 5 1
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