public function dropTable(jDbTable $table) { if ($this->tables === null) { $this->tables = $this->_getTables(); } $name = $table->getName(); if (isset($this->tables[$name])) { $this->_dropTable($name); unset($this->tables[$name]); } }
/** * @return jDbTable object corresponding to the new table */ public function renameTable(jDbTable $table, $newName) { if ($this->tables === null) { $this->tables = $this->_getTables(); } $name = $table->getName(); if (isset($this->tables[$newName]) || !isset($this->tables[$name]) || $name == $newName) { return false; } $newTable = $this->_renameTable($table, $newName); unset($this->tables[$name]); $this->tables[$newName] = $newTable; return $newTable; }