update users.sq3 utiltity
This commit is contained in:
parent
d76ac1e151
commit
f8b6c4dc89
@ -116,3 +116,23 @@ if (check_exists("nodemsgs") == 0) {
|
||||
$dbh->do($sql);
|
||||
$dbh->disconnect;
|
||||
}
|
||||
|
||||
if (check_exists("codepage") == 0) {
|
||||
print "Column \"codepage\" 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 codepage INTEGER DEFAULT 0";
|
||||
$dbh->do($sql);
|
||||
$dbh->disconnect;
|
||||
}
|
Reference in New Issue
Block a user