/** * {@inheritdoc} */ public function rollback() { return $this->driver->rollbackTransaction(); }
/** * Perform set of atomic operations required to update table schema. * * @throws SchemaException * @throws \Exception */ protected function updateSchema() { if ($this->primaryKeys != $this->dbPrimaryKeys) { throw new SchemaException("Primary keys can not be changed for already exists table."); } $this->driver->beginTransaction(); try { $this->updateColumns(); $this->updateIndexes(); $this->updateForeigns(); } catch (\Exception $exception) { $this->driver->rollbackTransaction(); throw $exception; } $this->driver->commitTransaction(); }