ModifyUsersTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 14
c 1
b 0
f 1
dl 0
loc 34
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 17 1
A down() 0 2 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class ModifyUsersTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::table('users', function (Blueprint $table) {
17
            $table->string('name')->nullable()->change();
18
            $table->string('first_name')->nullable();
19
            $table->string('last_name')->nullable();
20
            $table->string('company')->nullable();
21
            $table->string('piva')->nullable();
22
23
            $table->boolean('admin')->default(false);
24
25
            $table->string('telephone')->nullable();
26
            $table->string('address')->nullable();
27
            $table->string('province')->nullable();
28
            $table->text('floor')->nullable();
29
            $table->string('city')->nullable();
30
            $table->string('cap')->nullable();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     *
37
     * @return void
38
     */
39
    public function down()
40
    {
41
        #Schema::dropIfExists('users');
42
    }
43
}
44