Completed
Push — master ( 1a65d7...018a8e )
by Nil
03:48
created

CreateEmployeesTable::up()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 24
rs 8.9714
cc 1
eloc 20
nc 1
nop 0
1
<?php
2
3
namespace NilPortugues\Tests\App\Migrations;
4
5
use Illuminate\Database\Migrations\Migration;
6
use Illuminate\Database\Schema\Blueprint;
7
use Illuminate\Support\Facades\Schema;
8
9
class CreateEmployeesTable extends Migration
10
{
11
    /**
12
     * Run the migrations.
13
     */
14
    public function up()
15
    {
16
        Schema::create('employees', function (Blueprint $table) {
0 ignored issues
show
Bug introduced by
The method create() does not exist on Illuminate\Support\Facades\Schema. Did you maybe mean createFreshMockInstance()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
17
            $table->integer('id', true);
18
19
            $table->string('company', 50)->nullable()->index('company');
20
            $table->string('last_name', 50)->nullable()->index('last_name');
21
            $table->string('first_name', 50)->nullable()->index('first_name');
22
            $table->string('email_address', 50)->nullable();
23
            $table->string('job_title', 50)->nullable();
24
            $table->string('business_phone', 25)->nullable();
25
            $table->string('home_phone', 25)->nullable();
26
            $table->string('mobile_phone', 25)->nullable();
27
            $table->string('fax_number', 25)->nullable();
28
            $table->text('address')->nullable();
29
            $table->string('city', 50)->nullable()->index('city');
30
            $table->string('state_province', 50)->nullable()->index('state_province');
31
            $table->string('zip_postal_code', 15)->nullable()->index('zip_postal_code');
32
            $table->string('country_region', 50)->nullable();
33
            $table->text('web_page')->nullable();
34
            $table->text('notes')->nullable();
35
            $table->binary('attachments')->nullable();
36
        });
37
    }
38
39
    /**
40
     * Reverse the migrations.
41
     */
42
    public function down()
43
    {
44
        if (Schema::hasTable('employees')) {
45
            Schema::drop('employees');
46
        }
47
    }
48
}
49