/**
  * @return bool
  */
 public function needsUpgrade()
 {
     $dir = $this->getVar('wgSQLiteDataDir');
     $dbName = $this->getVar('wgDBname');
     // Don't create the data file yet
     if (!file_exists(DatabaseSqlite::generateFileName($dir, $dbName))) {
         return false;
     }
     // If the data file exists, look inside it
     return parent::needsUpgrade();
 }
 public function needsUpgrade()
 {
     $tempDBname = $this->getVar('wgDBname');
     $this->parent->setVar('wgDBname', $this->getVar('wgDBuser'));
     $retVal = parent::needsUpgrade();
     $this->parent->setVar('wgDBname', $tempDBname);
     return $retVal;
 }