[Nitro] [OG] - Automated table modification / extension
Ilias Lazaridis
ilias at lazaridis.com
Fri Apr 15 01:44:29 EDT 2005
George Moschovitis wrote:
> If you are designing your application just drop the database and let
> og create the tables again.
this is inconvenient.
> If you your application is live (in
> production) you have to manually alter the table.
inconvenient, too.
> An older version of Og had an alter method that tried to automatically
> alter the table to much the updated class definition. I 'll
> reimplement this funtionality (or perhaps someone can send me a
> patch).
this functionality is essential.
I mean, why do I use a dynamic language?
I hope this can be re-implemented soon, at least for simple
modifications, like "add property", "remove property" or "change
property type/size" etc.
And: objects should have a flag, which disallows automated
table-alterations.
> regards,
> George.
>
> On 4/15/05, Ilias Lazaridis <ilias at lazaridis.com> wrote:
>
>>I create a class, instantiate an object and save it within an sqlite3.
>>
>>I retrieve this object.
>>
>>[the table was created, and I load the object back]
>>
>>-
>>
>>In the next step, I add a new "property" to the class.
>>
>>I instantiate an new object, and try to save it.
>>
>>but: the save fails with an "field not fould" exception.
>>
>>[the new property i've added]
>>
>>-
>>
>>How do I setup OG that it automaticaly match the table to the updated
>>class-definition? (= automaticly add columns).
>>
>>.
>>
>>--
>>http://lazaridis.com
>>
>>_______________________________________________
>>Nitro-general mailing list
>>Nitro-general at rubyforge.org
>>http://rubyforge.org/mailman/listinfo/nitro-general
>>
>
>
>
--
http://lazaridis.com
More information about the Nitro-general
mailing list