On K, 2008-06-04 at 08:58 -0700, rob-twf wrote:
> So to summarise:
> 
> - signed integers are still the default
> - *except* for auto-generated primary keys, and foreign keys created
> using the 'sexy' references/belongs_to syntax
> - unsigned foreign keys can be created by passing :unsigned => false
> to references/belongs_to
> - existing columns (including primary keys) can be changed to/from
> unsigned using change_column

I'm still not sure why you think this should be made the default, sure
there are benefits in some specific cases but in the general case it
would just create unnecessary work for those who have an existing
project already using signed integers.

Basically everyone on an existing database will have to do a lot of
work to convert their integer types in order for their usual workflow
for creating migrations to not have to change. (In case one already has
FK constraints on signed types how easy would it be in mysql to
convert both columns to an unsigned type while also keeping the
FK constraint?)

Or they will have to keep track of which tables have signed and which
have unsigned primary keys and when to make an FK column signed,
which is not fun because until you add the FK constraint it will not be
clear that the types differ so you may even get partially ran migrations
because of this (and since mysql can not run migrations inside
a transaction this makes it even more difficult to recover).

How would you justify this?

Note that I don't use mysql so I shouldn't really care much about this,
but if I did I would not like to have to do either of the above for no
immediate benefit. I however have nothing against supporting :unsigned
option or making it possible to configure the default type of primary
key to be an unsigned int.


Thank you,
-- 
Tarmo Tänav <[EMAIL PROTECTED]>


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

Reply via email to