On 3/1/06, Bob Silva <[EMAIL PROTECTED]> wrote:
> > create_table :subscribers, :primary_key => :nick do |t|
> >  ...
> > end
>
> Unless I'm being a total idiot in reading the code, this creates an integer
> based primary key column and doesn't allow an arbitrary primary key column
> like in the example I provided.
>
>
Nope it was me being the idiot, I was kinda surprised that it did
this.  It doesn't respect the type you give the column if it's the
primary key. :(

mysql> describe subscribers;
+-------+--------------+------+-----+---------+----------------+
| Field | Type         | Null | Key | Default | Extra          |
+-------+--------------+------+-----+---------+----------------+
| nick  | int(11)      |      | PRI | NULL    | auto_increment |
| name  | varchar(100) | YES  |     | NULL    |                |
+-------+--------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)



--
Corey Donohoe
http://www.atmos.org/
[EMAIL PROTECTED]
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to