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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
change_tableis not supported yet for reversible migrations. See this comment at the top of the file (quoted below) :If you need to be able to reverse, you can use
add_columninstead ofchange_table: