Completed
Push — main ( a102d3...f9c7f4 )
by Emmanuel
03:55
created

CreateEventsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 34
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 16 1
A down() 0 4 1
1
<?php
2
3
4
/**
5
 * Author: Emmanuel Paul Mnzava
6
 * Twitter: @epmnzava
7
 * Github:https://github.com/dbrax/eticket
8
 * Email: [email protected]
9
 * 
10
 */
11
12
use Illuminate\Support\Facades\Schema;
13
use Illuminate\Database\Schema\Blueprint;
14
use Illuminate\Database\Migrations\Migration;
15
16
class CreateEventsTable extends Migration
17
{
18
    /**
19
     * Run the migrations.
20
     *
21
     * @return void
22
     */
23
    public function up()
24
    {
25
        Schema::create('events', function (Blueprint $table) {
26
            $table->bigIncrements('id');
27
            $table->integer('userid')->nullable(); //??? in multitenant or distribution
28
            $table->string('name');
29
            $table->string('location',225); 
30
            $table->integer('category'); 
31
            $table->string('city',255); 
32
            $table->string('country',255); 
33
            $table->text('description'); 
34
            $table->string('timezone')->default('(GMT+3:00) Nairobi');
35
36
            $table->timestamps();
37
        });
38
    }
39
40
    /**
41
     * Reverse the migrations.
42
     *
43
     * @return void
44
     */
45
    public function down()
46
    {
47
        Schema::dropIfExists('events');
48
    }
49
}
50