CreateVenuesTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A down() 0 3 1
A up() 0 19 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 CreateVenuesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('venues', function (Blueprint $table) {
17
            $table->id();
18
            $table->foreignId('country_id')->constrained();
19
20
            $table->string('name');
21
            $table->string('slug')->unique();
22
            $table->text('description')->nullable();
23
            $table->string('image')->nullable();
24
            $table->string('website')->nullable();
25
            $table->text('extra_info')->nullable();
26
            $table->string('address')->nullable();
27
            $table->string('city');
28
            $table->string('state_province')->nullable();
29
            $table->string('zip_code')->nullable();
30
            $table->float('lng', 9, 6)->nullable();
31
            $table->float('lat', 8, 6)->nullable();
32
            $table->timestamps();
33
        });
34
    }
35
36
    /**
37
     * Reverse the migrations.
38
     *
39
     * @return void
40
     */
41
    public function down()
42
    {
43
        Schema::dropIfExists('venues');
44
    }
45
}
46