On Monday, April 4, 2011 6:35:51 AM UTC-4, Frederick Cheung wrote: > > [...] > :primary_key is hardwired to be an integer on mysql, and I believe on > on postgres and other dbs too. If you want a primary key of a > different type I think you'll need to add the column as whatever data > type you want and then run a lump of sql to mark it as the primary key >
Nasty. I was hoping that wasn't the case. I had a quick look at the source for rails and the mysql2 gem and saw code that looked like the 'primary_key' type was being hard-coded to 'INT(11) NOT NULL AUTO_INCREMENT'. If that is your end goal you might not want to spend too much time > with activerecord since it only really does SQLish things (ie not > mongodb, couchdb etc.) > > If I understand correctly, without using ActiveRecord, the scaffolding won't work either. I'm guessing there are other parts of Rails that depend on AR too. I guess the answer to my subject question is "no" - Rails isn't suitable for modern scalable web apps. Sadly. It baffles me why a relatively young project would cripple itself by making use of legacy architecture almost mandatory. btw, there is nothing in the SQL standard that makes RDBMS inherently unscalable, it is just that the only implementations of RDBMs' currently publicly are not scalable (in the indefinite sense) - though that is about to change. I've used no-sql stores before, but I prefer not to give up SQL unless necessary (and it isn't). The only issue with SQL is that there is no standardization on how to handle domain-level conflict resolution (which is a given in a distributed system because inter-node communication can never be infinitely fast - even if networking technology advances, Einstein tells us that much). My next plan is to spend a little effort creating some custom code to attempt to use UUIDs as primary keys and if that proves to be too much work, I likely use Grails instead. Appreciate your reply. Cheers. -- 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.

