Dan Kubb (dkubb) wrote:
> Miles,
>
>   
>>> Where there's any possible confusion DataMapper.auto_update! doesn't
>>> do anything (so as to protect your data), so far as i know.  
>>> DataMapper.auto_migrate! should blank your db and rebuild the thing
>>> from scratch, so that should work.  If it doesn't, that's definitely a
>>> a bug.
>>>       
>> Thks for info.   But for agile work, auto_update is a real necessity
>> since auto_migrate loses all the data.   Adding fields seem to work -
>> changing tables a bit more difficult in SQLite since AlterTable is
>> limited, however Active Record migrate supports this so maybe some code
>> can be ported.  Should this be added as a bug or feature request ?
>>     
>
> In the 0.10 series DataMapper.auto_upgrade! is going to get a bit
> smarter.  This means it will be able to things like lengthen existing
> character columns, or increase the size of integer columns.   We may
> also experiment with decreasing column lengths only when no data will
> be truncated. We can also try toggling uniqueness and nullability
> constraints only when it will succeed.
>
> However, table or column renaming is something I am unsure we will be
> able to solve with auto-upgrade.  While it's easy for DataMapper to
> identify missing tables or columns and add them, identifying which
> existing tables and columns should be renamed probably can't be done
> safely.  For those types of changes I usually point people towards dm-
> migrations, since you can script out how things can be renamed.
>
> Unless you can think of another approach, I believe migration scripts
> are the cleanest approach to renaming and removing things.
>   
thks - I wasn't even aware of the plug-in.  I'll try it out though not 
even sure how to install the plug-in - maybe I can add some 
documentation on this as well.    I really do like the built-in 
auto-migrate feature though - it's one of our favorite features of 
datamapper. 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to