On Wed, Nov 26, 2008 at 4:40 AM, baaz <[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 26, 12:49 pm, Michael Klishin <[EMAIL PROTECTED]>
> wrote:
>> On 26.11.2008, at 13:45, baaz wrote:
>>
>> > I also added a property to the
>> > model class and then I realized that I am violating the good old DRY
>> > and in a very bad way.
>>
>> Migrations in DM only needed to make changes to existing data, rarely
>> to alter the schema.
>> In development you can always use DataMapper.auto_upgrade! which is
>> not destructive.
>>
>> MK
>
> Thank you. It seems to me that DataMapper.auto_upgrade! will not alter
> table schema either (so it is quite similar and maybe attached the
> db:autoupgrade rake task). Is there a task or instruction that is non-
> destructive vis the content yet can alter table definitions? The
> example I experienced with was toggling the 'nullability' of a column,
> and only db:automigrate altered it.
>
> Balint

I believe db:autoupgrade adds new columns. It just doesn't delete the
columns you remove. For example if you rename a field, db:autoupgrade
will create the new column, and then you can copy data from the old
column to the new column (using either migration or manually)

> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to