postgresql - Rails database table changed name, but index in another table refers to old name -
i changed table name "addresses" "locations". here 2 models class location < activerecord::base has_many :years, dependent: :destroy has_many :people, through: :years class year < activerecord::base belongs_to :location belongs_to :person i made change rename_table :addresses, :locations migration , changed names of folders, files , references in relevant controllers , views. seems ok except years database still has column address_id in years table. needs location_id . can migrate change.? links newly named database preserved? i've backed database , made spreadsheet copy of years output. an prechange version of project @ https://bitbucket.org/mtnbiker/crores5/src . i'm reluctant merge changes master until have sorted out. thanks suggestions. ps. don't recommend changing table name, had field named address in addresses table , wanted rid of confusion. needless say, i'm newbie. i think thing you're looking ...