Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8157923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:27:09+00:00 2026-06-06T17:27:09+00:00

I recently ran into an error when I tried to change the column name

  • 0

I recently ran into an error when I tried to change the column name in my schema. It worked locally, but when I db:migrated on Heroku, it gave me an error saying that the column didn’t exist.

In the past, I’ve been bad with unifying my Production schema and Development Schema. This is probably because I created migrations locally, ran db:migrate locally, and then deleted the migrations locally for some reason and then pushed to heroku, resulting in the migration being run locally but not in prod. (I now know this is a terrible thing to do, and I should have typed in the opposite function in self.down and did rake db:rollback)

What I want to know is, how do I check to see if my local and prod schema are different, and is there a way that I can just change my local tables/columns to fit the productions’? Since it seems to work with only the production stuff and I know I have useless tables/columns in my local env.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T17:27:10+00:00Added an answer on June 6, 2026 at 5:27 pm

    You can run a bash console on Heroku with:

    heroku run bash -a app_name
    

    From there you can navigate the filesystem using the standard bash commands and cat your schema.rb file to compare to your local schema.rb.

    To unify the schema I would suggest reading through the detail on Schema dumping in the Rails Guide to Migrations. You would copy the schema file over to your local environment, and then run `rake db:reset’ which will drop your development database and recreate it from the new schema. Be sure to read the Schema Dump details as there is more than one way to dump the schema depending on the needs of your database. And obviously, backup whatever you need to before your start.

    From that point on you should be back to clean slate where you can start migrations correctly again to update your local app and Heroku.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently wanted to update my gem bundle but ran into installation problems with
I recently had to change the linkage specification of several classes and ran into
I recently attempted to use selenium RC's GetAttribute method but immediately ran into a
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
I recently ran into a bug in my code when using boost::bind . From
I recently ran into an issue where a query was causing a full table
I recently ran into a familiar javascript/jQuery timing bug and spent too long debugging
A problem I recently ran into was that when trying to update a field
I'm currently playing around with tipfy on Google's Appengine and just recently ran into
My application requires the .NET Framework version 3.5. I recently ran into a customer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.