librenms/database/migrations/2023_10_31_074901_ospf_instances_unsigned.php
Tony Murray 9c2d2cd412
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
2023-10-31 10:11:56 -05:00

33 lines
902 B
PHP

<?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();
});
}
};