View Single Post

   
  #6 (permalink)  
Old 02-28-2008, 11:29 AM
Jerry Stuckle
 
Posts: n/a
Default Re: how to add a primary key to a table

anne001 wrote:
>> Why do you need an autoincrement value? student_id/event_id already is
>> unique; an autoincrement would be redundant.

>
> because for a join table, ruby on rails expects a single
> autoincremental key, it cannot work with multiple keys.
>
> I have copied the old table into a new table without the key type, but
> it would be nice to know how to change the original table directly
>
>


Read up on the ALTER TABLE command.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote