file = $file; } public function up() { return true; } public function down() { return true; } protected function db() { if ($this->db == null) { $this->db = NewADOConnection('mysqli'); $res = $this->db->Connect(APP_HOST, APP_USERNAME, APP_PASSWORD, APP_DB); } return $this->db; } public function getLastError() { return $this->lastError; } public function executeQuery($sql) { $ret = $this->db()->Execute($sql); if (!$ret) { $this->lastError = $this->db()->ErrorMsg(); LogManager::getInstance()->error('Error in migration: '.$this->lastError); } return $ret; } }