From: Glen Holcomb Date: 2008-06-25T23:30:08+09:00 Subject: Re: Sequel primary keys ------=_Part_34432_8463738.1214404265564 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Tue, Jun 24, 2008 at 11:33 PM, Robert Klemme wrote: > On 24.06.2008 20:13, Glen Holcomb wrote: > >> [Note: parts of this message were removed to make it a legal post.] >> >> On Tue, Jun 24, 2008 at 11:03 AM, Robert Klemme < >> shortcutter@googlemail.com> >> wrote: >> >> On 24.06.2008 18:01, Glen Holcomb wrote: >>> >>> I posted to the Sequel Google Group but it's horribly slow, assuming it >>>> took >>>> my post. >>>> >>>> Does anyone on here know if it is possible to create a non-integer >>>> primary >>>> key in Sequel? If so how? Also help with creating a non integer >>>> foreign >>>> key would be great too. I've done some poking through the Rdoc and some >>>> experimentation and it wants to make everything :integer or >>>> AUTOINCREMENT. >>>> >>>> The docs seem to indicate that you can use arbitrary PK's: >>> >>> http://sequel.rubyforge.org/classes/Sequel/Schema/Generator.html#M000257 >>> >>> So, if int is enforced there is a bug - either in your code or in >>> Sequel's >>> code. >>> >>> Thanks for the input Robert. >> > > You're welcome. > > It turns out there is a rather vaguely documented :auto_increment => false >> that needed to be included in my primary_key definition. Now I just need >> to >> figure out how to get foreign_keys to work. >> > > I have seen this documented in the docs. Does it not work as advertised? > I didn't run across it in my initial search. The pirmary_key method doc says to see column for available options. There is no :auto_increment listed in the valid options for column. It is logical that it would exist but I didn't see it in the doc. At least it didn't appear in a straight forward manner. > > The sequel-talk group seems to >> be working so I will continue this pursuit there. >> > > Good chances that you get more profound feedback there. > Turns out Jeremy was having to approve my messages to the Google Group/list which explains why it appeared to be acting oddly. > > Cheers > > robert > > -- "Hey brother Christian with your high and mighty errand, Your actions speak so loud, I can't hear a word you're saying." -Greg Graffin (Bad Religion) ------=_Part_34432_8463738.1214404265564--