mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix timetaken columns too small (#15042)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('devices', function (Blueprint $table) {
|
||||
$table->unsignedFloat('last_polled_timetaken')->nullable()->change();
|
||||
$table->unsignedFloat('last_discovered_timetaken')->nullable()->change();
|
||||
$table->unsignedFloat('last_ping_timetaken')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// can't undo the places change
|
||||
Schema::table('devices', function (Blueprint $table) {
|
||||
$table->float('last_polled_timetaken')->nullable()->change();
|
||||
$table->float('last_discovered_timetaken')->nullable()->change();
|
||||
$table->float('last_ping_timetaken')->nullable()->change();
|
||||
});
|
||||
}
|
||||
};
|
@@ -530,11 +530,11 @@ devices:
|
||||
- { Field: agent_uptime, Type: 'int unsigned', 'Null': false, Extra: '', Default: '0' }
|
||||
- { Field: last_polled, Type: timestamp, 'Null': true, Extra: '' }
|
||||
- { Field: last_poll_attempted, Type: timestamp, 'Null': true, Extra: '' }
|
||||
- { Field: last_polled_timetaken, Type: 'double(5,2)', 'Null': true, Extra: '' }
|
||||
- { Field: last_discovered_timetaken, Type: 'double(5,2)', 'Null': true, Extra: '' }
|
||||
- { Field: last_polled_timetaken, Type: 'double unsigned', 'Null': true, Extra: '' }
|
||||
- { Field: last_discovered_timetaken, Type: 'double unsigned', 'Null': true, Extra: '' }
|
||||
- { Field: last_discovered, Type: timestamp, 'Null': true, Extra: '' }
|
||||
- { Field: last_ping, Type: timestamp, 'Null': true, Extra: '' }
|
||||
- { Field: last_ping_timetaken, Type: 'double(8,2)', 'Null': true, Extra: '' }
|
||||
- { Field: last_ping_timetaken, Type: 'double unsigned', 'Null': true, Extra: '' }
|
||||
- { Field: purpose, Type: text, 'Null': true, Extra: '' }
|
||||
- { Field: type, Type: varchar(20), 'Null': false, Extra: '', Default: '' }
|
||||
- { Field: serial, Type: text, 'Null': true, Extra: '' }
|
||||
|
Reference in New Issue
Block a user