Passed
Push — develop ( a95732...cd40df )
by Septianata
12:51
created

anonymous//database/migrations/2021_05_22_000006_create_branches_table.php$0   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 10
c 0
b 0
f 0
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A 2021_05_22_000006_create_branches_table.php$0 ➔ up() 0 11 1
A 2021_05_22_000006_create_branches_table.php$0 ➔ down() 0 3 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
/**
8
 * @see \App\Models\Branch
9
 */
10
return new class extends Migration
11
{
12
    /**
13
     * Run the migrations.
14
     *
15
     * @return void
16
     */
17
    public function up()
18
    {
19
        Schema::create('branches', function (Blueprint $table) {
20
            $table->id();
21
22
            $table->string('name');
23
            $table->text('address');
24
            $table->string('address_latitude');
25
            $table->string('address_longitude');
26
            $table->string('google_map_url')->nullable();
27
            $table->timestamps();
28
        });
29
    }
30
31
    /**
32
     * Reverse the migrations.
33
     *
34
     * @return void
35
     */
36
    public function down()
37
    {
38
        Schema::dropIfExists('branches');
39
    }
40
};
41