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 7098169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:01:17+00:00 2026-05-28T11:01:17+00:00

I have what I think is a pretty simple migration. For some reason I

  • 0

I have what I think is a pretty simple migration. For some reason I get an IrreversibleMigration error when I try to db:rollback or db:migrate:redo.

The migration runs smoothly, but I’d rather keep it reversible. I can’t figure out why it’s not as written. Any ideas?

Here’s the migration:

class AddWhyHypAndWhyHypeToStatements < ActiveRecord::Migration
  def change
    change_table :statements do |t|
      t.rename :description, :why_hypocritical
      t.text   :why_hypothetical
    end
  end
end

If it matters, “description” column is a text column. I’m using Rails 3.1/Ruby 1.9.2/PostgreSQL. Thanks for any help.

  • 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-05-28T11:01:17+00:00Added an answer on May 28, 2026 at 11:01 am

    Looks like Rails has troubles reverting change_table method. Try doing it that way instead:

    class AddWhyHypAndWhyHypeToStatements < ActiveRecord::Migration
      def change
        rename_column :statements, :description, :why_hypocritical
        add_column :statements, :why_hypothetical, :text
      end
    end
    

    You can see the list of commands that can be inverted in the docs or in Rails Guides.

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

Sidebar

Related Questions

The layout I try to implement is (I think) pretty simple. One TextView expands
I think this should be pretty simple, but I'm a SQL newb. I have
I have what I think is a pretty simple question. I have a report
I have a pretty simple (or at least I think it is) animation. All
I think I have a pretty simple goal but cant seem to reach it.
These are probably are pretty simple YES|NO type questions. I have some NSDictionaries containing
I think this is pretty typical, you have the same website project with an
This should be pretty straightforward I would think. I have this string: [quote=Joe Johnson|1]Hi![/quote]
I think this is a pretty simple question but I'm having trouble finding the
I have the following piece of code, executing a pretty simple MySQL query: $netnestquery

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.