This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
David Heinemeier Hansson (author)
Fri Apr 25 14:33:00 -0700 2008
commit a37546517dad9f6d9a7de6e1dba4d960909d71e8
tree a96de198754909ac7fb131e4eee49adf6189b2d3
parent 1959db324653d5db345b935c9d2696c544d836af
tree a96de198754909ac7fb131e4eee49adf6189b2d3
parent 1959db324653d5db345b935c9d2696c544d836af
... |
... |
|
... |
... |
|












I would replace: :integer => { :name => “int”}, :limit => 11 },
with: :integer => { :name => “int”},
Otherwise, the default case of ‘int(11)’ is never executed.
Even with that change, this is causing problems when cloning the test database, as integer columns that were originally specified without an explicit limit in the migration now have a limit of 11, resulting in them being created as bigint(11) rather than int(11). This in turn breaks the clone when using foreign key constraints.
See [#55] for more details.
This patch is not backwards compatible in general. The default for :integer was int(11), so the new range for “integer” should include 11 (see my meta-patch at http://timothynjones.wordpress.com/2008/06/10/change-to-activerecord-mysql-adapter-breaks-tests/).
>timothynjones, this code is actually going to chance once more with: http://rails.lighthouseapp.com/projects/8994/tickets/420-interpret-limit-as-number-of-bytes
And the :limit is no longer going to specify the number of decimal places, instead if will specify the number of bytes, so I’d suggest not at all adding a :limit option to your integers unless you need bigint or mediumint or smallint. For schema.rb there should be no compatibility problems as I believe schema.rb has never dumped :limit for :integer types (rather the change would actually make schema.rb more accurate in being able to create correct integer types where it used to always create 4 byte integers).