Answers for "rails rename a table"

1

how to rename a table in ruby

class RenameOldTableToNewTable < ActiveRecord::Migration
   def change
     rename_table :old_table_name, :new_table_name
   end 
 end
Posted by: Guest on February-14-2020
2

rename column in db rails

rails generate migration rename_title_to_name_in_tasks
Posted by: Guest on December-17-2020

Browse Popular Code Answers by Language