On Sep 24, 7:19 pm, Adrian Madrid <[email protected]> wrote: > On Thu, Sep 24, 2009 at 18:01, Jeremy Evans <[email protected]> wrote: > > ... > > > One other thing I needed to make everything work in my case was > > foreign_key > > > in the migration. > > > # I used this > > > char :site_id, :size => 36, :null => true, :key => :id, :table => :sites > > > > # Instead of this > > > foreign_key :site_id, :table => :sites > > > You could also do: > > > foreign_key :site_id, :sites, :type=>:char, :size => 36, :null => > > true > > I didn't try that because I saw the Integer type hard-coded in the column > call in [1]. Can you override the type parameter with the :type hash option?
Yes. The default foreign_key type is Integer, but you can specify the :type option to override it. Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---
