mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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();
|
||||
});
|
||||
}
|
||||
};
|
@@ -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();
|
||||
});
|
||||
}
|
||||
};
|
30
database/migrations/2023_10_31_075239_ospf_nbrs_unsigned.php
Normal file
30
database/migrations/2023_10_31_075239_ospf_nbrs_unsigned.php
Normal 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();
|
||||
});
|
||||
}
|
||||
};
|
@@ -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();
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user