I changed the name of my 'image_url' column in my 'visions' table to 'image'. However, now when I try the command heroku run rake db:migrate
, I get the error: PG::UndefinedColumn: ERROR: column "image_url" does not exist
rails db:migrate works fine. However, heroku run rake db:migrate gives me the error.
this is my migration file for changing the column name:
def change
rename_column :visions, :image_url, :image
end
end
My schema for that table:
t.string "description"
t.string "image"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "user_id"
t.index ["user_id"], name: "index_visions_on_user_id"
end
Aucun commentaire:
Enregistrer un commentaire