On Feb 2, 2008, at 8:39 PM, James Britt wrote:

> s.ross wrote:
>
>> Now the magic migrations (ala Og) have been a subject of some  
>> debate because
>> They toast the table when they happen. As I understand it, adding a  
>> country
>> field to an address table would drop the table and recreate it.  
>> This can be
>> a particularly annoying side effect when dealing with tables that  
>> have
>> related tables, or worse, habtm.
>
> Do you know this to be true of Og, or just of DataMapper?
>
> I've been quite happy using Og for the last few years, though I may  
> not have yet done anything especially tricky that would bork it.

Sorry. Big clarification. DM does the thing with destroying the data,  
and the discussion occurred on the DM mailing list under the title  
"Crazy Migrations." The similarity to Og is in the notion of defining  
properties in your model class and having them appear as columns in  
your database.

 From my perspective, writing DDL is the most certain way to get what  
you want. But it's a mental context switch that not everyone wants to  
make regularly. AR migrations move from database-specific DDL to a  
more database-agnostic DSL, which is cool. Cooler is the promise of  
up- and down-migrations. But it turns out there are some migrations  
that can't really be reversed, such as removing columns. You can add  
the columns back in but the data can't easily be reconstructed.  
However, AR migrations let you mix and match database-specific stuff  
and also do initialization or whatever other munging you like. DM and  
Og have been without migrations as far as I know. Some have used these  
tools and not missed the migrations. I would find the lack of  
migrations a deal-breaker at this point.

Note: There are migrations being worked on in DM-land.

--steve