Passed
Push — master ( 2f9657...00b148 )
by Tony
08:56
created

CreateMplsLspsTable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 25
dl 0
loc 43
c 1
b 0
f 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 25 1
A down() 0 3 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateMplsLspsTable extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create('mpls_lsps', function (Blueprint $table) {
17
            $table->increments('lsp_id');
18
            $table->unsignedInteger('vrf_oid');
19
            $table->unsignedInteger('lsp_oid');
20
            $table->unsignedInteger('device_id')->index('device_id');
21
            $table->enum('mplsLspRowStatus', array('active','notInService','notReady','createAndGo','createAndWait','destroy'));
22
            $table->bigInteger('mplsLspLastChange')->nullable();
23
            $table->string('mplsLspName', 64);
24
            $table->enum('mplsLspAdminState', array('noop','inService','outOfService'));
25
            $table->enum('mplsLspOperState', array('unknown','inService','outOfService','transition'));
26
            $table->string('mplsLspFromAddr', 32);
27
            $table->string('mplsLspToAddr', 32);
28
            $table->enum('mplsLspType', array('unknown','dynamic','static','bypassOnly','p2mpLsp','p2mpAuto','mplsTp','meshP2p','oneHopP2p','srTe','meshP2pSrTe','oneHopP2pSrTe'));
29
            $table->enum('mplsLspFastReroute', array('true','false'));
30
            $table->bigInteger('mplsLspAge')->nullable();
31
            $table->bigInteger('mplsLspTimeUp')->nullable();
32
            $table->bigInteger('mplsLspTimeDown')->nullable();
33
            $table->bigInteger('mplsLspPrimaryTimeUp')->nullable();
34
            $table->unsignedInteger('mplsLspTransitions')->nullable();
35
            $table->bigInteger('mplsLspLastTransition')->nullable();
36
            $table->unsignedInteger('mplsLspConfiguredPaths')->nullable();
37
            $table->unsignedInteger('mplsLspStandbyPaths')->nullable();
38
            $table->unsignedInteger('mplsLspOperationalPaths')->nullable();
39
        });
40
    }
41
42
    /**
43
     * Reverse the migrations.
44
     *
45
     * @return void
46
     */
47
    public function down()
48
    {
49
        Schema::dropIfExists('mpls_lsps');
50
    }
51
}
52