Is there a way to write this in the command line that will auto-generate the migration script below?
Example:
ruby script/generate migration renamePostsTableToActicles
Generates:
class RenamePostsTableToActicles < ActiveRecord:Migration
def self.up
rename_table :posts, :articles
end
def self.down
rename_table :articles, :posts
end
end
Like:
ruby script/generate migration addCategoryIdToPosts category_id:integer