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 |
|
|
|
|
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
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.