rename ports column in device table to be num_ports
This commit is contained in:
8
Changes
8
Changes
@@ -1,8 +1,14 @@
|
|||||||
|
2.045002 - 2020-04-18
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* rename ports column in device table to be num_ports
|
||||||
|
|
||||||
2.045001 - 2020-04-18
|
2.045001 - 2020-04-18
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
* restore port column in device table, needed for discovery
|
* restore ports column in device table to fix discover bug
|
||||||
|
|
||||||
2.045000 - 2020-04-15
|
2.045000 - 2020-04-15
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ __PACKAGE__->load_namespaces(
|
|||||||
);
|
);
|
||||||
|
|
||||||
our # try to hide from kwalitee
|
our # try to hide from kwalitee
|
||||||
$VERSION = 61; # schema version used for upgrades, keep as integer
|
$VERSION = 62; # schema version used for upgrades, keep as integer
|
||||||
|
|
||||||
use Path::Class;
|
use Path::Class;
|
||||||
use File::ShareDir 'dist_dir';
|
use File::ShareDir 'dist_dir';
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ __PACKAGE__->add_columns(
|
|||||||
{ data_type => "text", is_nullable => 1 },
|
{ data_type => "text", is_nullable => 1 },
|
||||||
"layers",
|
"layers",
|
||||||
{ data_type => "varchar", is_nullable => 1, size => 8 },
|
{ data_type => "varchar", is_nullable => 1, size => 8 },
|
||||||
"ports",
|
"num_ports",
|
||||||
{ data_type => "integer", is_serializable => 0, is_nullable => 1 },
|
{ data_type => "integer", is_serializable => 0, is_nullable => 1 },
|
||||||
"mac",
|
"mac",
|
||||||
{ data_type => "macaddr", is_nullable => 1 },
|
{ data_type => "macaddr", is_nullable => 1 },
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ register_worker({ phase => 'early', driver => 'snmp' }, sub {
|
|||||||
my @properties = qw/
|
my @properties = qw/
|
||||||
snmp_ver
|
snmp_ver
|
||||||
description uptime name
|
description uptime name
|
||||||
layers ports mac
|
layers mac
|
||||||
ps1_type ps2_type ps1_status ps2_status
|
ps1_type ps2_type ps1_status ps2_status
|
||||||
fan slots
|
fan slots
|
||||||
vendor os os_ver
|
vendor os os_ver
|
||||||
@@ -51,7 +51,9 @@ register_worker({ phase => 'early', driver => 'snmp' }, sub {
|
|||||||
$device->set_column( contact => Encode::decode('UTF-8', $snmp->contact) );
|
$device->set_column( contact => Encode::decode('UTF-8', $snmp->contact) );
|
||||||
$device->set_column( location => Encode::decode('UTF-8', $snmp->location) );
|
$device->set_column( location => Encode::decode('UTF-8', $snmp->location) );
|
||||||
|
|
||||||
|
$device->set_column( num_ports => $snmp->ports );
|
||||||
$device->set_column( snmp_class => $snmp->class );
|
$device->set_column( snmp_class => $snmp->class );
|
||||||
|
|
||||||
$device->set_column( last_discover => \'now()' );
|
$device->set_column( last_discover => \'now()' );
|
||||||
|
|
||||||
schema('netdisco')->txn_do(sub {
|
schema('netdisco')->txn_do(sub {
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
BEGIN;
|
||||||
|
|
||||||
|
ALTER TABLE device RENAME COLUMN ports TO num_ports;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
Reference in New Issue
Block a user