In my general_exams table, I have a column named semester, type is string. Now I want to change its name to semester_id, type
general_exams
semester
string
semester_id
I hope this help
class ModifyColumnTables def change remove_column :posts, :old_column add_column :posts, :new_column, :type_of_column end end