/** * Remove all tables associated with the model if they already exist in the database. * * @return Migration */ public function remove() { // Loop through every table foreach ($this->_tables as $table) { // If the table exists if ($table = Database_Table::instance($table->name, $this->_db)) { // Then drop it DB::drop('table', $table->name)->execute($this->_db); } } // Return this for chaining return $this; }