/** * Retorna la versión de TOBA con la cual fue cargado el proyecto en la instancia * @return toba_version */ function get_version_actual() { $proyecto = $this->db->quote($this->identificador); $sql = "SELECT version_toba FROM apex_proyecto WHERE proyecto= {$proyecto}"; $rs = $this->db->consultar($sql); if (!empty($rs)) { if (!isset($rs[0]['version_toba'])) { return toba_version::inicial(); } return new toba_version($rs[0]['version_toba']); } return toba_version::inicial(); }
function get_version_actual() { $sql = 'SELECT version FROM apex_instancia'; $rs = $this->get_db()->consultar($sql); if (empty($rs)) { return toba_version::inicial(); //Es la version anterior al cambio de la migracion } else { return new toba_version($rs[0]['version']); } }
function get_version_anterior() { if (file_exists($this->dir_base() . "/VERSION")) { return new toba_version(file_get_contents($this->dir_base() . "/VERSION")); } else { return toba_version::inicial(); } }