/** * Commits serializable transaction */ public static function dbCommit($t) { if (!$t) { return; } if ($t !== self::$transactionNumber) { throw new Exception("Transaction number [{$t}] is not equal to [{self::{$transactionNumber}}]"); } $adapter = Zend_Db_Table_Abstract::getDefaultAdapter(); $adapter->commit(); self::$transactionNumber = 0; }
/** * Commit a transaction (see comment above) * * @param mixed transaction identifier (whatever was passed back from startTransaction()) * @param Migration migration that is currently running */ private final function commitTransaction($transaction, Migration $migration) { if (class_exists('QFrame_Db_SerializableTransaction')) { $result = QFrame_Db_SerializableTransaction::dbCommit($transaction); } else { if (!$this->dbAdapter->commit()) { throw new Exception('Could not commit transaction for migration ' . get_class($migration)); } } }