my $sth = $self->prepare($s);
$sth->execute;
while (my @t = $sth->fetchrow_array) {
- if ($t[0] eq 'ipaddr') {
+ if ($t[1] eq 'ipaddr') {
$sth->finish;
return 1;
}
sub add_ipaddr
{
my $self = shift;
- my $s = q(alter table spot add column ipaddr varchar(40));
+ my $s = q(alter table spot add column ipaddr text);
$self->do($s);
}
sub spot_add_indexes
{
my $self = shift;
- $self->do('create index spot_ix1 on spot(time desc)');
dbg('adding spot index ix1');
- $self->do('create index spot_ix2 on spot(spotcall asc)');
+ $self->do('create index spot_ix1 on spot(time desc)');
dbg('adding spot index ix2');
+ $self->do('create index spot_ix2 on spot(spotcall asc)');
}