How To I Change The Name Of A Column In

[Solved] How To I Change The Name Of A Column In | Ruby - Code Explorer | yomemimo.com
Question : how to I change the name of a column in rails

Answered by : bright-beaver

$ rails g migration rename_season_to_season_id
class RenameSeasonToSeasonId < ActiveRecord::Migration def change rename_column :shoes, :season, :season_id end
end

Source : https://stackoverflow.com/questions/34796492/change-column-name-rails/34796781 | Last Update : Fri, 21 Feb 20

Answers related to how to I change the name of a column in rails

Code Explorer Popular Question For Ruby