public static function DBCreate($aCallback = null) { // Note: we have to check if the DB does exist, because we may share the DB // with other applications (in which case the DB does exist, not the tables with the given prefix) if (!CMDBSource::IsDB(self::$m_sDBName)) { CMDBSource::CreateDB(self::$m_sDBName); } self::DBCreateTables($aCallback); self::DBCreateViews(); }
protected function DoPrepare() { $sDBHost = $this->GetDBHost(); $sDBUser = $this->GetDBUser(); $sDBPwd = $this->GetDBPwd(); $sDBName = $this->GetDBName(); CMDBSource::Init($sDBHost, $sDBUser, $sDBPwd); CMDBSource::SetCharacterSet(); if (CMDBSource::IsDB($sDBName)) { CMDBSource::DropDB($sDBName); } CMDBSource::CreateDB($sDBName); }