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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:33:27+00:00 2026-05-31T23:33:27+00:00

The error shows this code can not rollback: class AddCountToTag < ActiveRecord::Migration def change

  • 0

The error shows this code can not rollback:

class AddCountToTag < ActiveRecord::Migration
    def change
        change_table :tags do |t|
            t.integer :count
            t.index :count
        end
    end
end

Where is wrong?

  • 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-31T23:33:28+00:00Added an answer on May 31, 2026 at 11:33 pm

    change_table is not supported yet for reversible migrations. See this comment at the top of the file (quoted below) :

    # <tt>ActiveRecord::Migration::CommandRecorder</tt> records commands done during
        # a migration and knows how to reverse those commands. The CommandRecorder
        # knows how to invert the following commands:
        #
        # * add_column
        # * add_index
        # * add_timestamps
        # * create_table
        # * create_join_table
        # * remove_timestamps
        # * rename_column
        # * rename_index
        # * rename_table
    

    If you need to be able to reverse, you can use add_column instead of change_table:

    class AddCountToTag < ActiveRecord::Migration
        def change
            add_column :tags, :count, :integer
            ...
        end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I change the code, so that the VS2010 compiler's error message points to
When trying to get next activities it shows this error: This page contains the
Why does Glassfish shows this facelets error: javax.el.ELException: /foo/client.xhtml @11,74 value=#{messageBean.messages}: javax.mail.MessagingException: Socket closed;
When i am running my application as shown below error shows can you tell
When I tried to call a class called ShowHistory in Java, an error shows:
The Visual Studio Error List shows like 50 errors about controls and variables not
I can't build successfully project in VS2010 it shows me error: Error 579 Unable
Can any one help me to identify the error in this program using ADO.NET...
My epoll_wait fails due to EINTR. My gdb trace shows this: enter code here
Ok this question stems from this question: wp7: App failing! Can not figure out

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.