]> git.donarmstrong.com Git - infobot.git/blobdiff - src/dbi.pl
SQLite2 also supported
[infobot.git] / src / dbi.pl
index f4c89d3a80e5caf2e096c6067b293b8feffafc0b..99d115e4d95d81a3f471faeaff568be27e2f4d39 100644 (file)
@@ -19,7 +19,7 @@ package main;
 sub sqlOpenDB {
     my ($db, $type, $user, $pass, $no_fail) = @_;
     # this is a mess. someone fix it, please.
-    if ($type =~ /^SQLite$/i) {
+    if ($type =~ /^SQLite(2)?$/i) {
        $db = "dbname=$db.sqlite";
     } elsif ($type =~ /^pg/i) {
        $db = "dbname=$db";
@@ -629,7 +629,7 @@ sub checkTables {
        &status("Tables: ".join(',',@tables));
        @db{@tables} = (1) x @tables;
 
-    } elsif ($param{DBType} =~ /^SQLite$/i) {
+    } elsif ($param{DBType} =~ /^SQLite(2)?$/i) {
 
        # retrieve a list of db's from the server.
        foreach ( &sqlRawReturn("SELECT name FROM sqlite_master WHERE type='table'") ) {