Completed
Push — master ( 48d32a...4da889 )
by Igor
04:45
created

TestingCreateEmployeesTable   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 39
rs 10
wmc 4
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class TestingCreateEmployeesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        if (config('database.connections.sqlsrv.driver') == 'sqlite') {
17
            $table->increments('id');
18
            $table->string('full_name');
19
            $table->string('br_cpf');
20
            $table->string('email')->unique();
21
            $table->string('telephone_type');
22
            $table->string('telephone');
23
            $table->string('zip_code');
24
            $table->string('city');
25
            $table->string('state');
26
            $table->string('avenue');
27
            $table->bigInteger('number');
28
            $table->string('neighborhood');
29
            $table->string('complement');
30
            $table->string('password');
31
            $table->boolean('active');
32
            $table->rememberToken();
33
            $table->timestamps();
34
        }
35
    }
36
37
    /**
38
     * Reverse the migrations.
39
     *
40
     * @return void
41
     */
42
    public function down()
43
    {
44
        if (config('database.connections.sqlsrv.driver') == 'sqlite') {
45
            Schema::dropIfExists('employees');
46
        }
47
    }
48
}
49