Completed
Push — develop ( 55c38a...c1b735 )
by Nate
12:53
created

m190426_101341_project_config   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 28
ccs 0
cts 17
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 14 1
A safeDown() 0 4 1
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/patron/license
6
 * @link       https://www.flipboxfactory.com/software/patron/
7
 */
8
9
namespace flipbox\patron\migrations;
10
11
use craft\db\Migration;
12
use flipbox\patron\records\Provider;
13
14
class m190426_101341_project_config extends Migration
15
{
16
    /**
17
     * @inheritdoc
18
     */
19
    public function safeUp()
20
    {
21
        $this->addColumn(
22
            Provider::tableName(),
23
            'clientId',
24
            $this->char(Provider::CLIENT_ID_LENGTH)->notNull()
25
        );
26
27
        $this->addColumn(
28
            Provider::tableName(),
29
            'clientSecret',
30
            $this->char(Provider::CLIENT_SECRET_LENGTH)
31
        );
32
    }
33
34
    /**
35
     * @inheritdoc
36
     */
37
    public function safeDown()
38
    {
39
        return true;
40
    }
41
}
42