rails g migration "command" to generate column rename migration?

rails-migrations, ruby-on-rails

Solution

No, There is no auto-generation command for "renaming" columns.

Refer Source Code. Auto generator understands only "to","from","add","remove","join_table","create"

Problem

I want to auto generate a migration file that looks like this: ``` class RenameDatabaseColumn < ActiveRecord::Migration def change rename_column :events, :subcategory, :subcategory_id end end ``` Is there some way to format my ``` rails g migration ~rename_column_events_subcategory_subcategory_id~ ``` or something like that to auto generate that file?

Original source

Related problems