示例#1
0
 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]);
     }
 }
示例#2
0
 /**
  * @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;
 }