Test Failed
Push — develop ( 8a31ce...8fcf9d )
by nguereza
02:43
created

DropUserAgeField20210720080558::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace Platine\Framework\Migration;
4
5
use Platine\Database\Schema\AlterTable;
6
use Platine\Framework\Migration\AbstractMigration;
7
8
class DropUserAgeField20210720080558 extends AbstractMigration
9
{
10
11
    public function up(): void
12
    {
13
      //Action when migrate up
14
        $this->alter('users', function (AlterTable $table) {
15
            $table->dropColumn('age');
16
        });
17
    }
18
19
    public function down(): void
20
    {
21
      //Action when migrate down
22
        $this->alter('users', function (AlterTable $table) {
23
            $table->integer('age')
24
                 ->size('tiny')
25
                 ->description('The user age');
26
        });
27
    }
28
}
29