mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
MAC Vendor OUI use scheduler (#15187)
* MAC Vendor OUI use scheduler Add command to update `lnms maintenance:fetch-ouis` Show vendor column in tables if mac_oui.enabled is set to true Improve scheduler validation handle non-standard install directories and systems without systemd Add index to table to improve speed and improve mac->vendor lookup speed Scheduled weekly with random wait to prevent stampeding herd issues for upstream drop oui update from daily * MAC Vendor OUI use scheduler Add command to update `lnms maintenance:fetch-ouis` Show vendor column in tables if mac_oui.enabled is set to true * Lint fixes and better prefix detection * update schema file
This commit is contained in:
@@ -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('vendor_ouis', function (Blueprint $table) {
|
||||
$table->string('oui', 12)->change();
|
||||
$table->unique(['oui']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('vendor_ouis', function (Blueprint $table) {
|
||||
$table->dropUnique('vendor_ouis_oui_unique');
|
||||
$table->string('oui')->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user