/** * {@inheritdoc} */ public function deleteTable($table, $check_empty = false) { $name = is_array($table) ? ArrayUtils::get($table, 'name') : $table; if (empty($name)) { throw new BadRequestException('Table name can not be empty.'); } try { $this->parent->getConnection()->deleteTable($name); $this->refreshCachedTables(); return array('name' => $name); } catch (\Exception $ex) { throw new InternalServerErrorException("Failed to delete table '{$name}'.\n{$ex->getMessage()}"); } }
/** * {@inheritdoc} */ protected function rollbackTransaction() { if (!isset($this->backupOps)) { switch ($this->getAction()) { case Verbs::POST: case Verbs::PUT: case Verbs::PATCH: case Verbs::MERGE: case Verbs::DELETE: /** @var BatchResult $result */ $this->parent->getConnection()->batch($this->backupOps); break; default: break; } $this->backupOps = null; } return true; }