dweinand wrote:
>>From the PostgreSQL Documentation:
> 
> A transaction is said to be atomic: from the point of view of other
> transactions, it either happens completely or not at all.
> http://www.postgresql.org/docs/8.2/interactive/tutorial-transactions.html
> 
> so if you put you migration into a transaction and  it fails in the
> middle, everything done so far will be reverted. a migration is never
> be half-done.
> 
> whats about mysql and the others? are there no transactions available
> in the database? does a mysql database really stay in the state where
> the migrations fails?
> not for real?

The question is not if the DB supports transactions (most do, even MySQL 
with the InnoDB backend) but if the DB supports table/database 
modifications in transations (at least MySQL does not!).

This does not work in MySQL:

BEGIN;
ALTER TABLE .....
UPDATE TABLE ...
ALTER TABLE ....
COMMIT;

This will not be rolled back correctly.

Jonathan

-- 
Jonathan Weiss
http://blog.innerewut.de

--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to