[Nitro] Og's answer to migrations?
william.full.moon at gmail.com
Sat Dec 8 23:34:16 EST 2007
Wouldn't the success of this example depend on the "PhoneNumber" structure's
relationship with "User"?
Also, I'm a little curious about how (or indeed IF) different instances of
structures are associated, linked and otherwise understood.
A long time ago, I had a question about how to explicitly open two distinct
tables of the same class -- Migration is a good use case for that. I didn't
really get a comfortable answer. In fact having two Og instances of the
same Object type tended (at that tiem) to be problematic.
a = PhoneNumber.new( "/usr/pathone" )
b = PhoneNumber.new( "/usr/pathTwo" )
Aggregated_customers = PhoneNumber.new( "/usr/pathall" )
Is that any easier these day?
On 08/12/2007, George Moschovitis <george.moschovitis at gmail.com> wrote:
> just write a small script:
> for u in User.all
> PhoneNumber.create(u.phone, u)
> then just call alter table drop column to remove the uneeded column.
> On Dec 8, 2007 7:44 AM, Arne Brasseur < arne at arnebrasseur.net> wrote:
> > I was just thinking about this, say you're building an address book app.
> > At first you give every address one phone number, but people start
> > complaining and so you want to add a separate table for phone numbers so
> > an address can have n phone numbers. Naturally you want to keep your
> > data. Does Og have any functionality whatsoever to assist here?
> > If you're familiar with Og, how would you do this?
> > (ab)
> > --
> > Ein Fuchs muß tun, was ein Fuchs tun muß
> > arne at arnebrasseur.net
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
> Nitro-general mailing list
> Nitro-general at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nitro-general