OSPF tables fix integer types (#15528)

All Counter32 and Gauge32 types should be unsigned integers to match the range that can be returned via snmp
This commit is contained in:
Tony Murray
2023-10-31 10:11:56 -05:00
committed by GitHub
parent 7a6ef2491e
commit 9c2d2cd412
5 changed files with 134 additions and 10 deletions

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_areas', function (Blueprint $table) {
$table->unsignedInteger('ospfSpfRuns')->change();
$table->unsignedInteger('ospfAreaBdrRtrCount')->change();
$table->unsignedInteger('ospfAsBdrRtrCount')->change();
$table->unsignedInteger('ospfAreaLsaCount')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_areas', function (Blueprint $table) {
$table->integer('ospfSpfRuns')->change();
$table->integer('ospfAreaBdrRtrCount')->change();
$table->integer('ospfAsBdrRtrCount')->change();
$table->integer('ospfAreaLsaCount')->change();
});
}
};

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_instances', function (Blueprint $table) {
$table->unsignedInteger('ospfExternLsaCount')->change();
$table->unsignedInteger('ospfOriginateNewLsas')->change();
$table->unsignedInteger('ospfRxNewLsas')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_instances', function (Blueprint $table) {
$table->integer('ospfExternLsaCount')->change();
$table->integer('ospfOriginateNewLsas')->change();
$table->integer('ospfRxNewLsas')->change();
});
}
};

View File

@@ -0,0 +1,30 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_nbrs', function (Blueprint $table) {
$table->unsignedInteger('ospfNbrEvents')->change();
$table->unsignedInteger('ospfNbrLsRetransQLen')->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_nbrs', function (Blueprint $table) {
$table->integer('ospfNbrEvents')->change();
$table->integer('ospfNbrLsRetransQLen')->change();
});
}
};

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('ospf_ports', function (Blueprint $table) {
$table->unsignedInteger('ospfIfEvents')->nullable()->change();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('ospf_ports', function (Blueprint $table) {
$table->integer('ospfIfEvents')->nullable()->change();
});
}
};