554 642 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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'");
    }
    if (!DBSlotExists("interfaces", "fixedmode")) {
        DBQueryFatal("alter table interfaces " .
		     " add `fixedmode` tinyint(1) NOT NULL default '0' ".
		     "   after duplex");
    }
    return 0;
}

# Local Variables:
# mode:perl
# End: