modify the name of the :id to :another_id in rails 3

Posted by figuedmundo on Stack Overflow See other posts from Stack Overflow or by figuedmundo
Published on 2012-07-03T20:02:39Z Indexed on 2012/07/03 21:16 UTC
Read the original article Hit count: 153

Well I googled my question but I couldn't find anything or I it's not the correct question..

The issue is I need modify the primary_key name of the database :id with :another_id, in my project I need to use pgrouting and it contains several plsql functions and these functions uses the primary-key with the name gid and instead of modify the plsql functions is better change the id name, and I was thinking do this with a migration becouse I thought it's the rails way.

Is it possible, and how I can do this ??

Thanks in advance and sorry for my english.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-3.2