CreateTenantTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 16
nc 1
nop 0
dl 0
loc 19
rs 9.4285
c 1
b 0
f 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Support\Facades\Schema;
5
6
class CreateTenantTable extends Migration
7
{
8
    /**
9
     * Run the migrations.
10
     *
11
     * @return void
12
     */
13
    public function up()
14
    {
15
        Schema::create(config('plugin.tenant'), function (\Illuminate\Database\Schema\Blueprint $blueprint) {
16
            $blueprint->increments('id');
17
            $blueprint->string('addon_key');
18
            $blueprint->string('client_key', 36);
19
            $blueprint->string('public_key')->nullable();
20
            $blueprint->string('shared_secret');
21
            $blueprint->string('server_version', 20);
22
            $blueprint->string('plugin_version', 20);
23
            $blueprint->string('base_url');
24
            $blueprint->string('product_type', 10);
25
            $blueprint->text('description');
26
            $blueprint->string('event_type', 20);
27
            $blueprint->boolean('is_dummy')->default(false);
28
29
            $blueprint->rememberToken();
30
            $blueprint->timestamps();
31
            $blueprint->softDeletes();
32
        });
33
    }
34
35
    /**
36
     * Reverse the migrations.
37
     *
38
     * @return void
39
     */
40
    public function down()
41
    {
42
        Schema::dropIfExists(config('plugin.tenant'));
43
    }
44
}
45