Reputation: 1389
I generated a new migration using command,
rails g migration add_stdf_to_sds blahblah:string
I have not used rake:db migrate till now and I don't want to use it because I don't want this migration to happen, how can I delete my generated migration?
I know about rollback, but I haven't used db:migrate till now so it won't work. (I guess).
Upvotes: 0
Views: 167
Reputation: 2633
rails d migration add_stdf_to_sds
In general 'rails d' which stands for 'rails destroy' is a great way to undo any command that a generator has performed.
Upvotes: 1
Reputation: 11
rails g migration adds a file in db/migrations that starts with a timestamp. Delete that file from the filesystem.
Upvotes: 1