Q:

Migration to create default value

So 
I want to know whether we can write a new migration just to set default value of a field,which is already created. I know how to write edit the old migration and set its default value. I want to do this because I have done so many migrations and I cant roll back now and edit that file. 
And also, Is there any way to rollback to a particular migration?
Thanks in advance

A:

Run
rails g migration add_default_value_to_table

then in the migration file
def up
    change_column :table_name, :column_name, :string, :default => "abcd"
end

def down
    change_column :table_name, :column_name, :string, :default => nil
end

I've used datatype string as an example, you can do it for column with any datatype

