m241125_122400_alter_token_table::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
use yii\db;
6
7
class m241125_122400_alter_token_table extends db\Migration
8
{
9
    private const TABLE_NAME = 'token';
10
    private const COLUMN_NAME = 'type';
11
12
    public function up(): void
13
    {
14
        $this->alterColumn(
15
            static::TABLE_NAME,
16
            static::COLUMN_NAME,
17
            $this->string(64)->notNull()
18
        );
19
    }
20
21
    public function down(): void
22
    {
23
        $this->alterColumn(
24
            static::TABLE_NAME,
25
            static::COLUMN_NAME,
26
            $this->string(64)->notNull()
27
        );
28
    }
29
}
30