Commit faf0dab5 authored by Leigh Stoller's avatar Leigh Stoller

Change current_speed in the interfaces table from enum to varchar

(so it stays a string). This value always comes from the interface
types/caps tables, and we keep adding new values to the enum which
is annoying. So just assume that interface types/caps holds a
valid and correct value.
parent d174b128
......@@ -2764,7 +2764,7 @@ CREATE TABLE `interfaces` (
`interface_type` varchar(30) default NULL,
`iface` text NOT NULL,
`role` enum('ctrl','expt','jail','fake','other','gw','outer_ctrl','mngmnt') default NULL,
`current_speed` enum('0','10','100','1000','4000','10000','25000','40000','56000','100000') NOT NULL default '0',
`current_speed` varchar(12) NOT NULL default '0',
`duplex` enum('full','half') NOT NULL default 'full',
`noportcontrol` tinyint(1) NOT NULL default '0',
`rtabid` smallint(5) unsigned NOT NULL default '0',
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
my $type = DBSlotType("interfaces", "current_speed");
if ($type =~ /enum/) {
DBQueryFatal("alter table interfaces change `current_speed` ".
" `current_speed` varchar(12) NOT NULL default '0'");
}
return 0;
}
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment