Forum: Ruby on Rails Creating new version of migrations

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9f6e775366f2f607647fab8eeed66507?d=identicon&s=25 Vapor .. (vapor)
on 2008-11-11 09:22
I have a migration file like [datetime]_create_posts.rb .

Now I want [anotherdatetime]_create_posts.rb with some changes different
from older migration that I can run with ... rake db:migrate
VERSION=[anotherdatetime].

How can I create [anotherdatetime]_create_posts.rb, which is basically a
new version?
D69d23d8e811e8ab2a8593380d6ede63?d=identicon&s=25 Jeff Emminger (jemminger)
on 2008-11-11 20:12
(Received via mailing list)
you probably don't want to *create* the posts table again, you likely
want to change the existing schema.  just make a new migration like
so:

"ruby script/generate migration 'do_something_else_to_posts' "

and then use the add_column, remove_column, rename_column, etc...
methods for migrations.



On Nov 11, 3:22 am, "Vapor .." <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.