Passed
Push — master ( 0b6474...9f87cc )
by Curtis
06:39 queued 03:56
created

AddColumnDatiPlacFamcFamsToPeopleTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 10
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 9.9332
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Migrations\Migration was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
4
use Illuminate\Database\Schema\Blueprint;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Schema\Blueprint was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
5
use Illuminate\Support\Facades\Schema;
0 ignored issues
show
Bug introduced by
The type Illuminate\Support\Facades\Schema was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class AddColumnDatiPlacFamcFamsToPeopleTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::table('people', function (Blueprint $table) {
17
            $table->string('birthday_dati')->nullable();
18
            $table->string('birthday_plac')->nullable();
19
            $table->string('deathday_dati')->nullable();
20
            $table->string('deathday_plac')->nullable();
21
            $table->string('deathday_caus')->nullable();
22
            $table->string('burial_day_dati')->nullable();
23
            $table->string('burial_day_plac')->nullable();
24
            $table->string('famc')->nullable();
25
            $table->string('fams')->nullable();
26
        });
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::table('people', function (Blueprint $table) {
37
            $table->dropColumn([
38
                'birthday_dati',
39
                'birthday_plac',
40
                'deathday_dati',
41
                'deathday_plac',
42
                'deathday_caus',
43
                'burial_day_dati',
44
                'burial_day_plac',
45
                'famc',
46
                'fams'
47
            ]);
48
        });
49
    }
50
}
51