In Rails 3, how do you change the default primary key type, e.g. BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
In my case, I'm interested in MySQL.
For Rails 2, you can see the answer to the question "How to use long identifiers in Rails?" 1
In Rails 3, however, this will throw an error. I'm not sure if this is because the class has not been used for a long time, or if the code should go in one place. You can see in active_record/connection_adapters/mysql_adapter.rb that the constant NATIVE_DATABASE_TYPES is still defined.
What is the correct way to achieve the same effect in Rails 3?
source share