/** * {@inheritdoc} * * @link http://en.wikipedia.org/wiki/Isolation_(database_systems) * @param string $isolationLevel */ public function begin($isolationLevel = null) { return $this->driver->beginTransaction($isolationLevel); }
/** * 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(); }