554 650 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
use strict;
use libdb;

sub DoUpdate($$$)
{
    my ($dbhandle, $dbname, $version) = @_;

    my $type = DBSlotType("interfaces", "current_speed");
    if ($type =~ /auto/) {
        DBQueryFatal("alter table interfaces ".
		     "  change `current_speed` `current_speed` " .
		     "  enum('0','10','100','1000','4000','10000',".
		     "       '40000','100000') NOT NULL default '0'");
    }
15
    if (!DBSlotExists("interfaces", "noportcontrol")) {
16
        DBQueryFatal("alter table interfaces " .
Leigh B Stoller's avatar
Leigh B Stoller committed
17
		     " add `noportcontrol` tinyint(1) NOT NULL default '0' ".
18 19 20 21 22 23 24 25
		     "   after duplex");
    }
    return 0;
}

# Local Variables:
# mode:perl
# End: