Updated users_sql_update.pl to include bwavepktno
This commit is contained in:
parent
2ea8a3df99
commit
fe88e363aa
@ -76,3 +76,24 @@ if (check_exists("archiver") == 0) {
|
|||||||
$dbh->do($sql);
|
$dbh->do($sql);
|
||||||
$dbh->disconnect;
|
$dbh->disconnect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (check_exists("bwavepktno") == 0) {
|
||||||
|
print "Column \"bwavepktno\" doesn't exist... adding..\n";
|
||||||
|
|
||||||
|
my ($needed) = @_;
|
||||||
|
|
||||||
|
my $dsn = "dbi:SQLite:dbname=$dbfile";
|
||||||
|
my $user = "";
|
||||||
|
my $password = "";
|
||||||
|
my $dbh = DBI->connect($dsn, $user, $password, {
|
||||||
|
PrintError => 0,
|
||||||
|
RaiseError => 1,
|
||||||
|
AutoCommit => 1,
|
||||||
|
FetchHashKeyName => 'NAME_lc',
|
||||||
|
});
|
||||||
|
|
||||||
|
my $sql = "ALTER TABLE users ADD COLUMN bwavepktno INTEGER DEFAULT 0";
|
||||||
|
$dbh->do($sql);
|
||||||
|
$dbh->disconnect;
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user