On Nov 11, 2009, at 4:55 AM, Thomas Gendulphe wrote:

>
> Hi,
>
> Everything is in the title.
> With Rails 2.3.4 and MySQL 5.0.41:
>
> If have a table like this:
>
> +----------------+------------+------+-----+--------- 
> +----------------+
> | Field          | Type       | Null | Key | Default |  
> Extra          |
> +----------------+------------+------+-----+--------- 
> +----------------+
> | id             | int(11)    | NO   | PRI | NULL    |  
> auto_increment |
> | author_id      | int(11)    | YES  |     | NULL     
> |                |
> | author_bet_id  | int(11)    | YES  |     | NULL     
> |                |
> | author_comment | text       | YES  |     | NULL     
> |                |
> | created_at     | datetime   | YES  |     | NULL     
> |                |
> | confirmed      | tinyint(1) | YES  |     | NULL     
> |                |
> | admin_comment  | text       | YES  |     | NULL     
> |                |
> | confirmed_at   | datetime   | YES  |     | NULL     
> |                |
> | bet_id         | int(11)    | YES  | MUL | NULL     
> |                |
> | user_id        | int(11)    | YES  | MUL | NULL     
> |                |
> +----------------+------------+------+-----+--------- 
> +----------------+
>
> But in schema.rb, I have this:
>
>  create_table "abuses", :force => true do |t|
>    t.integer  "author_id"
>    t.integer  "author_bet_id"
>    t.text     "author_comment"
>    t.datetime "created_at"
>    t.boolean  "confirmed"
>    t.text     "admin_comment"
>    t.datetime "confirmed_at"
>    t.integer  "bet_id"
>    t.integer  "user_id"
>  end
>
> Why the hell is the size limit lost?
> -- 

What size limit is that? Did you mean to show the migration that  
created the table? Since MySQL has no boolean type, it gets  
implemented as tinyint(1) and the default for integer is int(11). Do  
you still thing that there is a problem?

-Rob

Rob Biedenharn          http://agileconsultingllc.com
[email protected]




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to