Ask A Question

Notifications

You’re not receiving notifications from this thread.

PG conflict changing the name of an attribute in the database

Damian Nelwep asked in General

Hi everyone,

I'm having an issue after changing the name in a "Relationship" Controller and Model (the name is "follow / unfollow" and before was "meaw / unmeaw" (which I endend founding pretty bad and got back to something more classic). I also changed it in the database and many other places, but PostGres displays an error message as follow :

PG::UndefinedColumn: ERROR:  column relationships.meawed_id does not exist
LINE 1: ...users"."id" = "relationships"."follower_id" WHERE "relations...
                                                             ^
: SELECT  1 AS one FROM "users" INNER JOIN "relationships" ON "users"."id" = "relationships"."follower_id" WHERE "relationships"."meawed_id" = $1 LIMIT $2

I wonder if I have to take care of this with another migration or directly using PG interface... The problem is that I don't remember the password or how to authenticate. I thought it might be better to reset the database.

Thank you so much in advance for your advice

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 85,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.