function ejecutar() { foreach ($this->sql as $sentencia) { try { $this->db->ejecutar($sentencia); } catch (toba_error $e) { throw new toba_error("Error cargando los datos de la personalizacion. El sql ejecutado fue: {$sentencia}"); } } }
private function kill_schemas($nombre) { $nombre_t = $nombre . '_logs'; $this->db->ejecutar("DROP SCHEMA IF EXISTS {$nombre_t} CASCADE;"); //Si existe schema previo de personalizacion lo borramos. $this->db->ejecutar("DROP SCHEMA IF EXISTS {$nombre} CASCADE;"); }
function migrar_estructura_campos_toba_2_4() { foreach ($this->tablas as $t) { $nombre = $this->prefijo . $t; if ($this->conexion->existe_tabla($this->schema_logs, $nombre)) { $sql = "ALTER TABLE {$this->schema_logs}.{$nombre} ALTER auditoria_usuario TYPE character varying(60);"; $this->conexion->ejecutar($sql); } } }
protected function check_constraints() { $this->db->agregar_savepoint('chequeo_conflicto'); $sql = $this->to_sql(); $fallo = false; try { $this->db->ejecutar($sql); $this->db->liberar_savepoint('chequeo_conflicto'); } catch (toba_error_db $e) { $fallo = $e; $this->db->abortar_savepoint('chequeo_conflicto'); } return $fallo; }