[Nitro] Og's answer to migrations?

* William 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.

Eg.
      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)
> end
>
> then just call alter table drop column to remove the uneeded column.
>
> -g.
>
> 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
>
>
>
>
> --
> http://me.gr
> http://joy.gr
> http://cull.gr
> http://nitroproject.org
> http://phidz.com
> http://joyerz.com
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20071209/61465685/attachment.html 


More information about the Nitro-general mailing list