Completed
Push — master ( 25c873...2076b7 )
by Afshin
02:25
created

AddHasPicToUsersTableMigration::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 9.4285
1
<?php
2
3
use Phpmig\Migration\Migration;
4
use Illuminate\Database\Capsule\Manager as Capsule;
5
6
class AddHasPicToUsersTableMigration extends Migration
7
{
8
    /**
9
     * Do the migration
10
     */
11
    public function up()
12
    {
13
        Capsule::schema()->table('users', function($table)
14
        {
15
            $table->enum('has_pic',['no','yes'])->default('no');
16
        });
17
    }
18
19
    /**
20
     * Undo the migration
21
     */
22
    public function down()
23
    {
24
        Capsule::schema()->table('users', function($table)
25
        {
26
            $table->drop('has_pic');
27
        });
28
    }
29
}