Completed
Pull Request — devel (#18)
by
unknown
38:28
created

m180622_161900_oauthCypherKeys::safeDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * m180622_161900_oauthCypherKeys.php
4
 * PHP version 5.6+
5
 *
6
 * Create applicants
7
 *
8
 * @author Maxime Deschamps <[email protected]>
9
 * @copyright 2010-2018 Ibitux
10
 * @license http://www.ibitux.com/license license
11
 * @version XXX
12
 * @link http://www.ibitux.com
13
 * @package src\migrations
14
 */
15
16
use yii\db\Migration;
17
18
/**
19
 * Class m180622_161900_oauthCypherKeys
20
 *
21
 * @author Maxime Deschamps <[email protected]>
22
 * @copyright 2010-2018 Ibitux
23
 * @license http://www.ibitux.com/license license
24
 * @version XXX
25
 * @link http://www.ibitux.com
26
 * @package src\migrations
27
 * @since XXX
28
 */
29
class m180622_161900_oauthCypherKeys extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
30
{
31
    /**
32
     * @inheritdoc
33
     */
34
    public function safeUp()
35
    {
36
        $this->createTable('{{%oauthCypherKeys}}', [
37
            'id' => $this->string(255),
38
            'publicKey' => $this->text(),
39
            'privateKey' => $this->text(),
40
            'encryptionAlgorithm' => $this->string(255),
41
            'dateCreated' => $this->datetime(),
42
            'dateUpdated' => $this->datetime(),
43
            'dateDeleted' => $this->dateTime(),
44
            'PRIMARY KEY(id)',
45
        ], 'ENGINE=InnoDB DEFAULT CHARSET=utf8');
46
        return true;
47
    }
48
49
    /**
50
     * @inheritdoc
51
     */
52
    public function safeDown()
53
    {
54
        $this->dropTable('{{%oauthCypherKeys}}');
55
        return true;
56
    }
57
58
}
59